Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deduplicate Binary Integer parsing logic #84582

Merged
merged 13 commits into from
Apr 17, 2023

Conversation

tannergooding
Copy link
Member

This utilizes generic math to deduplicate most of the Binary Integer parsing logic. Doing so simplifies the code we need to maintain and will also make it easier to onboard UTF-8 support

@ghost
Copy link

ghost commented Apr 10, 2023

Tagging subscribers to this area: @dotnet/area-system-numerics
See info in area-owners.md if you want to be subscribed.

Issue Details

This utilizes generic math to deduplicate most of the Binary Integer parsing logic. Doing so simplifies the code we need to maintain and will also make it easier to onboard UTF-8 support

Author: tannergooding
Assignees: tannergooding
Labels:

area-System.Numerics

Milestone: -

Copy link
Member

@stephentoub stephentoub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty:
image

@tannergooding tannergooding marked this pull request as ready for review April 11, 2023 20:41
@jeffhandley jeffhandley added the NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) label Apr 11, 2023
@jeffhandley
Copy link
Member

I've marked this as NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) for now. We need to find the best way to address mono perf regressions detected in dotnet/perf-autofiling-issues#15699 before we merge this in on top of it.

@tannergooding
Copy link
Member Author

tannergooding commented Apr 14, 2023

Perf for RyuJIT

Perf_Byte

Method Job Toolchain value Mean Error StdDev Median Min Max Ratio Allocated Alloc Ratio
Parse Job-ZFHTXZ \runtime-base\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 0 5.311 ns 0.0564 ns 0.0527 ns 5.296 ns 5.255 ns 5.386 ns 1.00 - NA
Parse Job-MVSMSI \runtime\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 0 5.278 ns 0.0161 ns 0.0143 ns 5.276 ns 5.256 ns 5.302 ns 0.99 - NA
Parse Job-ZFHTXZ \runtime-base\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 255 6.179 ns 0.0177 ns 0.0166 ns 6.171 ns 6.161 ns 6.205 ns 1.00 - NA
Parse Job-MVSMSI \runtime\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 255 6.705 ns 0.0117 ns 0.0098 ns 6.706 ns 6.682 ns 6.722 ns 1.09 - NA

Perf_Int16

Method Job Toolchain value Mean Error StdDev Median Min Max Ratio RatioSD Allocated Alloc Ratio
Parse Job-UDHQHO \runtime-base\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe -32768 7.635 ns 0.1184 ns 0.1107 ns 7.605 ns 7.499 ns 7.816 ns 1.00 0.00 - NA
Parse Job-SZFASY \runtime\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe -32768 8.277 ns 0.1013 ns 0.0948 ns 8.229 ns 8.159 ns 8.445 ns 1.08 0.02 - NA
Parse Job-UDHQHO \runtime-base\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 0 5.652 ns 0.0561 ns 0.0498 ns 5.637 ns 5.607 ns 5.766 ns 1.00 0.00 - NA
Parse Job-SZFASY \runtime\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 0 5.469 ns 0.0350 ns 0.0327 ns 5.469 ns 5.429 ns 5.526 ns 0.97 0.01 - NA
Parse Job-UDHQHO \runtime-base\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 32767 7.491 ns 0.0567 ns 0.0502 ns 7.463 ns 7.448 ns 7.589 ns 1.00 0.00 - NA
Parse Job-SZFASY \runtime\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 32767 7.856 ns 0.0525 ns 0.0491 ns 7.845 ns 7.796 ns 7.962 ns 1.05 0.01 - NA

Perf_Int32

Method Job Toolchain value Mean Error StdDev Median Min Max Ratio Allocated Alloc Ratio
Parse Job-FTXZMQ \runtime-base\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe -2147483648 9.973 ns 0.0352 ns 0.0312 ns 9.963 ns 9.933 ns 10.045 ns 1.00 - NA
Parse Job-ZVLPQD \runtime\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe -2147483648 9.246 ns 0.0268 ns 0.0237 ns 9.238 ns 9.224 ns 9.303 ns 0.93 - NA
ParseSpan Job-FTXZMQ \runtime-base\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe -2147483648 9.954 ns 0.0230 ns 0.0192 ns 9.948 ns 9.932 ns 9.998 ns 1.00 - NA
ParseSpan Job-ZVLPQD \runtime\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe -2147483648 9.280 ns 0.0420 ns 0.0350 ns 9.270 ns 9.247 ns 9.368 ns 0.93 - NA
Parse Job-FTXZMQ \runtime-base\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 12345 7.284 ns 0.0250 ns 0.0209 ns 7.288 ns 7.247 ns 7.319 ns 1.00 - NA
Parse Job-ZVLPQD \runtime\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 12345 7.016 ns 0.0782 ns 0.0731 ns 6.992 ns 6.883 ns 7.131 ns 0.96 - NA
ParseSpan Job-FTXZMQ \runtime-base\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 12345 7.293 ns 0.0353 ns 0.0276 ns 7.293 ns 7.255 ns 7.336 ns 1.00 - NA
ParseSpan Job-ZVLPQD \runtime\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 12345 7.089 ns 0.0200 ns 0.0178 ns 7.085 ns 7.070 ns 7.129 ns 0.97 - NA
Parse Job-FTXZMQ \runtime-base\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 2147483647 9.812 ns 0.0374 ns 0.0350 ns 9.819 ns 9.737 ns 9.884 ns 1.00 - NA
Parse Job-ZVLPQD \runtime\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 2147483647 9.281 ns 0.0870 ns 0.0814 ns 9.296 ns 9.143 ns 9.405 ns 0.95 - NA
ParseSpan Job-FTXZMQ \runtime-base\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 2147483647 9.776 ns 0.0306 ns 0.0271 ns 9.768 ns 9.741 ns 9.839 ns 1.00 - NA
ParseSpan Job-ZVLPQD \runtime\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 2147483647 9.305 ns 0.0274 ns 0.0256 ns 9.293 ns 9.271 ns 9.357 ns 0.95 - NA
ParseHex Job-FTXZMQ \runtime-base\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 3039 6.394 ns 0.0281 ns 0.0249 ns 6.391 ns 6.353 ns 6.445 ns 1.00 - NA
ParseHex Job-ZVLPQD \runtime\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 3039 6.390 ns 0.0284 ns 0.0266 ns 6.379 ns 6.361 ns 6.454 ns 1.00 - NA
Parse Job-FTXZMQ \runtime-base\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 4 5.507 ns 0.0348 ns 0.0325 ns 5.501 ns 5.445 ns 5.571 ns 1.00 - NA
Parse Job-ZVLPQD \runtime\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 4 5.531 ns 0.0473 ns 0.0442 ns 5.529 ns 5.466 ns 5.610 ns 1.00 - NA
ParseHex Job-FTXZMQ \runtime-base\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 4 5.164 ns 0.0436 ns 0.0408 ns 5.150 ns 5.104 ns 5.233 ns 1.00 - NA
ParseHex Job-ZVLPQD \runtime\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 4 5.159 ns 0.0251 ns 0.0235 ns 5.157 ns 5.126 ns 5.205 ns 1.00 - NA
ParseSpan Job-FTXZMQ \runtime-base\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 4 5.508 ns 0.0376 ns 0.0352 ns 5.502 ns 5.467 ns 5.580 ns 1.00 - NA
ParseSpan Job-ZVLPQD \runtime\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 4 5.546 ns 0.0524 ns 0.0490 ns 5.526 ns 5.480 ns 5.642 ns 1.01 - NA
ParseHex Job-FTXZMQ \runtime-base\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 7FFFFFFF 8.062 ns 0.0148 ns 0.0115 ns 8.063 ns 8.040 ns 8.085 ns 1.00 - NA
ParseHex Job-ZVLPQD \runtime\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 7FFFFFFF 8.071 ns 0.0348 ns 0.0325 ns 8.066 ns 8.027 ns 8.128 ns 1.00 - NA
ParseHex Job-FTXZMQ \runtime-base\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 80000000 8.319 ns 0.0411 ns 0.0385 ns 8.320 ns 8.267 ns 8.369 ns 1.00 - NA
ParseHex Job-ZVLPQD \runtime\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 80000000 8.097 ns 0.0340 ns 0.0302 ns 8.094 ns 8.057 ns 8.171 ns 0.97 - NA

Perf_Int64

Method Job Toolchain value Mean Error StdDev Median Min Max Ratio Allocated Alloc Ratio
Parse Job-FTXZMQ \runtime-base\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe -9223372036854775808 15.480 ns 0.0542 ns 0.0507 ns 15.466 ns 15.400 ns 15.563 ns 1.00 - NA
Parse Job-ZVLPQD \runtime\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe -9223372036854775808 13.931 ns 0.0670 ns 0.0627 ns 13.904 ns 13.862 ns 14.076 ns 0.90 - NA
ParseSpan Job-FTXZMQ \runtime-base\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe -9223372036854775808 15.656 ns 0.0404 ns 0.0377 ns 15.664 ns 15.590 ns 15.724 ns 1.00 - NA
ParseSpan Job-ZVLPQD \runtime\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe -9223372036854775808 13.783 ns 0.0566 ns 0.0529 ns 13.773 ns 13.698 ns 13.877 ns 0.88 - NA
Parse Job-FTXZMQ \runtime-base\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 12345 7.732 ns 0.0800 ns 0.0709 ns 7.694 ns 7.674 ns 7.890 ns 1.00 - NA
Parse Job-ZVLPQD \runtime\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 12345 7.445 ns 0.0707 ns 0.0661 ns 7.455 ns 7.302 ns 7.561 ns 0.96 - NA
ParseSpan Job-FTXZMQ \runtime-base\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 12345 7.550 ns 0.0546 ns 0.0456 ns 7.542 ns 7.490 ns 7.657 ns 1.00 - NA
ParseSpan Job-ZVLPQD \runtime\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 12345 7.308 ns 0.0161 ns 0.0151 ns 7.312 ns 7.280 ns 7.327 ns 0.97 - NA
Parse Job-FTXZMQ \runtime-base\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 9223372036854775807 15.232 ns 0.0830 ns 0.0777 ns 15.224 ns 15.108 ns 15.375 ns 1.00 - NA
Parse Job-ZVLPQD \runtime\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 9223372036854775807 13.701 ns 0.1341 ns 0.1254 ns 13.680 ns 13.551 ns 13.885 ns 0.90 - NA
ParseSpan Job-FTXZMQ \runtime-base\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 9223372036854775807 15.081 ns 0.0570 ns 0.0476 ns 15.076 ns 15.021 ns 15.176 ns 1.00 - NA
ParseSpan Job-ZVLPQD \runtime\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 9223372036854775807 13.850 ns 0.0408 ns 0.0381 ns 13.844 ns 13.800 ns 13.924 ns 0.92 - NA

Perf_SByte

Method Job Toolchain value Mean Error StdDev Median Min Max Ratio Allocated Alloc Ratio
Parse Job-ZFHTXZ \runtime-base\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe -128 6.716 ns 0.0162 ns 0.0144 ns 6.716 ns 6.692 ns 6.739 ns 1.00 - NA
Parse Job-MVSMSI \runtime\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe -128 7.241 ns 0.0243 ns 0.0228 ns 7.236 ns 7.217 ns 7.291 ns 1.08 - NA
Parse Job-ZFHTXZ \runtime-base\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 127 6.574 ns 0.0447 ns 0.0396 ns 6.560 ns 6.522 ns 6.652 ns 1.00 - NA
Parse Job-MVSMSI \runtime\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 127 7.099 ns 0.0341 ns 0.0285 ns 7.102 ns 7.063 ns 7.166 ns 1.08 - NA

Perf_UInt16

Method Job Toolchain value Mean Error StdDev Median Min Max Ratio Allocated Alloc Ratio
Parse Job-FTXZMQ \runtime-base\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 0 5.280 ns 0.0126 ns 0.0118 ns 5.277 ns 5.266 ns 5.308 ns 1.00 - NA
Parse Job-ZVLPQD \runtime\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 0 5.283 ns 0.0236 ns 0.0221 ns 5.283 ns 5.254 ns 5.316 ns 1.00 - NA
Parse Job-FTXZMQ \runtime-base\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 12345 6.934 ns 0.0142 ns 0.0119 ns 6.938 ns 6.911 ns 6.954 ns 1.00 - NA
Parse Job-ZVLPQD \runtime\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 12345 7.659 ns 0.0328 ns 0.0306 ns 7.654 ns 7.618 ns 7.724 ns 1.10 - NA
Parse Job-FTXZMQ \runtime-base\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 65535 6.923 ns 0.0109 ns 0.0102 ns 6.924 ns 6.906 ns 6.942 ns 1.00 - NA
Parse Job-ZVLPQD \runtime\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 65535 7.838 ns 0.0380 ns 0.0355 ns 7.820 ns 7.791 ns 7.906 ns 1.13 - NA

Perf_UInt32

Method Job Toolchain value Mean Error StdDev Median Min Max Ratio RatioSD Allocated Alloc Ratio
ParseSpan Job-FTXZMQ \runtime-base\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 0 5.316 ns 0.0361 ns 0.0301 ns 5.307 ns 5.271 ns 5.379 ns 1.00 0.00 - NA
ParseSpan Job-ZVLPQD \runtime\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 0 5.342 ns 0.0504 ns 0.0471 ns 5.351 ns 5.289 ns 5.446 ns 1.01 0.01 - NA
Parse Job-FTXZMQ \runtime-base\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 0 5.298 ns 0.0310 ns 0.0274 ns 5.293 ns 5.270 ns 5.361 ns 1.00 0.00 - NA
Parse Job-ZVLPQD \runtime\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 0 5.295 ns 0.0251 ns 0.0222 ns 5.301 ns 5.259 ns 5.324 ns 1.00 0.01 - NA
ParseSpan Job-FTXZMQ \runtime-base\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 12345 6.941 ns 0.0420 ns 0.0373 ns 6.928 ns 6.902 ns 7.040 ns 1.00 0.00 - NA
ParseSpan Job-ZVLPQD \runtime\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 12345 7.036 ns 0.1444 ns 0.1351 ns 7.007 ns 6.912 ns 7.384 ns 1.01 0.02 - NA
Parse Job-FTXZMQ \runtime-base\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 12345 7.012 ns 0.0298 ns 0.0264 ns 7.014 ns 6.973 ns 7.071 ns 1.00 0.00 - NA
Parse Job-ZVLPQD \runtime\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 12345 6.948 ns 0.0384 ns 0.0359 ns 6.948 ns 6.896 ns 7.015 ns 0.99 0.01 - NA
ParseSpan Job-FTXZMQ \runtime-base\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 4294967295 10.214 ns 0.1149 ns 0.1075 ns 10.205 ns 9.991 ns 10.369 ns 1.00 0.00 - NA
ParseSpan Job-ZVLPQD \runtime\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 4294967295 9.413 ns 0.0560 ns 0.0497 ns 9.408 ns 9.345 ns 9.496 ns 0.92 0.01 - NA
Parse Job-FTXZMQ \runtime-base\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 4294967295 9.609 ns 0.1264 ns 0.1121 ns 9.626 ns 9.458 ns 9.816 ns 1.00 0.00 - NA
Parse Job-ZVLPQD \runtime\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 4294967295 9.371 ns 0.0401 ns 0.0375 ns 9.358 ns 9.325 ns 9.457 ns 0.98 0.01 - NA

Perf_UInt64

Method Job Toolchain value Mean Error StdDev Median Min Max Ratio Allocated Alloc Ratio
ParseSpan Job-FTXZMQ \runtime-base\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 0 5.322 ns 0.0142 ns 0.0118 ns 5.324 ns 5.303 ns 5.340 ns 1.00 - NA
ParseSpan Job-ZVLPQD \runtime\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 0 5.327 ns 0.0221 ns 0.0185 ns 5.326 ns 5.303 ns 5.364 ns 1.00 - NA
Parse Job-FTXZMQ \runtime-base\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 0 5.304 ns 0.0497 ns 0.0465 ns 5.283 ns 5.250 ns 5.397 ns 1.00 - NA
Parse Job-ZVLPQD \runtime\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 0 5.323 ns 0.0289 ns 0.0271 ns 5.324 ns 5.278 ns 5.370 ns 1.00 - NA
ParseSpan Job-FTXZMQ \runtime-base\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 12345 7.318 ns 0.0220 ns 0.0184 ns 7.327 ns 7.278 ns 7.334 ns 1.00 - NA
ParseSpan Job-ZVLPQD \runtime\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 12345 7.320 ns 0.0228 ns 0.0202 ns 7.316 ns 7.294 ns 7.365 ns 1.00 - NA
Parse Job-FTXZMQ \runtime-base\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 12345 7.308 ns 0.0280 ns 0.0234 ns 7.295 ns 7.287 ns 7.362 ns 1.00 - NA
Parse Job-ZVLPQD \runtime\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 12345 7.311 ns 0.0220 ns 0.0195 ns 7.306 ns 7.286 ns 7.352 ns 1.00 - NA
ParseSpan Job-FTXZMQ \runtime-base\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 18446744073709551615 14.255 ns 0.0585 ns 0.0519 ns 14.245 ns 14.197 ns 14.362 ns 1.00 - NA
ParseSpan Job-ZVLPQD \runtime\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 18446744073709551615 14.232 ns 0.0513 ns 0.0480 ns 14.221 ns 14.180 ns 14.321 ns 1.00 - NA
Parse Job-FTXZMQ \runtime-base\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 18446744073709551615 15.764 ns 0.1176 ns 0.1100 ns 15.739 ns 15.618 ns 15.995 ns 1.00 - NA
Parse Job-ZVLPQD \runtime\artifacts\bin\testhost\net8.0-windows-Release-x64\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 18446744073709551615 14.335 ns 0.0992 ns 0.0928 ns 14.302 ns 14.236 ns 14.494 ns 0.91 - NA

@tannergooding
Copy link
Member Author

MonoInterpreter is fine overall. It, however, really doesn't like changes such as:

public static int Parse(string s)
{
-    if (s == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.s);
-    return Number.ParseInt32(s, NumberStyles.Integer, NumberFormatInfo.CurrentInfo);
+    return Parse(s, NumberStyles.Integer, provider: null);
}

public static int Parse(string s, NumberStyles style, IFormatProvider? provider)
{
-    NumberFormatInfo.ValidateParseStyleInteger(style);
-    if (s == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.s);
-    return Number.ParseInt32(s, style, NumberFormatInfo.GetInstance(provider));
+    ArgumentNullException.ThrowIfNull(s);
+    return Parse(s.AsSpan(), style, provider);
}

public static int Parse(ReadOnlySpan<char> s, NumberStyles style = NumberStyles.Integer, IFormatProvider? provider = null)
{
    NumberFormatInfo.ValidateParseStyleInteger(style);
    return Number.ParseInt32(s, style, NumberFormatInfo.GetInstance(provider));
}

Parse(ROSpan<char>, NumberStyles, IFormatProvider) stays fine and sees almost no change in perf. However, Parse(string) and Parse(string s, NumberStyles, IFormatProvider) both see a hit, likely because of the additional calls and the validation not getting optimized out accordingly.

Is there anything we can do here to improve Mono for such scenarios? Being able to reduce the duplicated code here makes the code a lot more readable/maintainable and is a fairly standard practice throughout the BCL and in user code.

Perf for MonoInterpreter

Perf_Byte

Method Job Toolchain value Mean Error StdDev Median Min Max Ratio RatioSD Allocated Alloc Ratio
Parse Job-AHYKFF \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 0 112.8 ns 1.77 ns 1.65 ns 112.9 ns 110.5 ns 115.5 ns 1.00 0.00 - NA
Parse Job-XPVCTY \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 0 116.9 ns 2.56 ns 2.95 ns 116.3 ns 113.2 ns 124.3 ns 1.04 0.03 - NA
Parse Job-AHYKFF \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 255 141.8 ns 1.60 ns 1.42 ns 141.8 ns 139.7 ns 144.1 ns 1.00 0.00 - NA
Parse Job-XPVCTY \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 255 156.1 ns 2.82 ns 2.64 ns 156.0 ns 152.6 ns 161.7 ns 1.10 0.03 - NA

Perf_Int16

Method Job Toolchain value Mean Error StdDev Median Min Max Ratio RatioSD Allocated Alloc Ratio
Parse Job-JMVOVS \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe -32768 176.9 ns 3.50 ns 3.44 ns 176.8 ns 170.0 ns 184.3 ns 1.00 0.00 - NA
Parse Job-XPNLVI \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe -32768 205.3 ns 4.32 ns 4.98 ns 204.2 ns 198.9 ns 215.7 ns 1.16 0.03 - NA
Parse Job-JMVOVS \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 0 118.4 ns 1.96 ns 1.74 ns 118.8 ns 115.6 ns 121.4 ns 1.00 0.00 - NA
Parse Job-XPNLVI \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 0 121.0 ns 2.59 ns 2.88 ns 120.2 ns 116.9 ns 126.4 ns 1.02 0.02 - NA
Parse Job-JMVOVS \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 32767 169.3 ns 3.12 ns 2.92 ns 169.3 ns 164.5 ns 174.0 ns 1.00 0.00 - NA
Parse Job-XPNLVI \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 32767 198.8 ns 5.33 ns 6.14 ns 197.4 ns 191.5 ns 210.1 ns 1.17 0.04 - NA

Perf_Int32

Method Job Toolchain value Mean Error StdDev Median Min Max Ratio RatioSD Allocated Alloc Ratio
Parse Job-EAKIVL \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe -2147483648 199.56 ns 8.215 ns 9.461 ns 197.22 ns 184.31 ns 216.59 ns 1.00 0.00 - NA
Parse Job-WCSSKS \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe -2147483648 241.14 ns 4.283 ns 3.797 ns 242.24 ns 231.48 ns 245.72 ns 1.21 0.06 - NA
ParseSpan Job-EAKIVL \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe -2147483648 208.41 ns 5.466 ns 6.294 ns 209.99 ns 198.07 ns 220.43 ns 1.00 0.00 - NA
ParseSpan Job-WCSSKS \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe -2147483648 219.41 ns 4.935 ns 5.683 ns 218.75 ns 207.10 ns 227.61 ns 1.05 0.04 - NA
Parse Job-EAKIVL \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 12345 135.51 ns 3.007 ns 3.462 ns 134.34 ns 129.56 ns 142.32 ns 1.00 0.00 - NA
Parse Job-WCSSKS \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 12345 170.99 ns 2.592 ns 2.425 ns 171.37 ns 166.83 ns 174.39 ns 1.27 0.03 - NA
ParseSpan Job-EAKIVL \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 12345 139.72 ns 2.900 ns 2.713 ns 139.14 ns 134.43 ns 144.93 ns 1.00 0.00 - NA
ParseSpan Job-WCSSKS \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 12345 148.16 ns 3.165 ns 3.108 ns 147.91 ns 143.19 ns 154.92 ns 1.06 0.03 - NA
Parse Job-EAKIVL \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 2147483647 196.67 ns 5.606 ns 6.231 ns 194.55 ns 187.07 ns 209.92 ns 1.00 0.00 - NA
Parse Job-WCSSKS \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 2147483647 237.38 ns 5.535 ns 6.374 ns 237.08 ns 224.52 ns 249.77 ns 1.21 0.05 - NA
ParseSpan Job-EAKIVL \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 2147483647 198.03 ns 3.702 ns 3.281 ns 198.30 ns 192.02 ns 204.86 ns 1.00 0.00 - NA
ParseSpan Job-WCSSKS \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 2147483647 208.87 ns 5.385 ns 5.985 ns 208.75 ns 199.86 ns 221.95 ns 1.06 0.04 - NA
ParseHex Job-EAKIVL \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 3039 197.53 ns 4.203 ns 4.128 ns 196.20 ns 191.41 ns 206.12 ns 1.00 0.00 - NA
ParseHex Job-WCSSKS \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 3039 202.80 ns 3.572 ns 3.166 ns 202.34 ns 196.72 ns 208.42 ns 1.03 0.03 - NA
Parse Job-EAKIVL \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 4 92.47 ns 1.794 ns 1.498 ns 92.79 ns 90.28 ns 95.84 ns 1.00 0.00 - NA
Parse Job-WCSSKS \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 4 126.84 ns 2.505 ns 2.680 ns 126.32 ns 123.20 ns 131.95 ns 1.38 0.04 - NA
ParseHex Job-EAKIVL \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 4 133.66 ns 3.522 ns 4.055 ns 132.14 ns 128.51 ns 141.50 ns 1.00 0.00 - NA
ParseHex Job-WCSSKS \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 4 136.72 ns 2.780 ns 2.465 ns 136.80 ns 133.01 ns 140.76 ns 1.02 0.04 - NA
ParseSpan Job-EAKIVL \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 4 104.32 ns 1.881 ns 2.013 ns 103.80 ns 101.58 ns 108.60 ns 1.00 0.00 - NA
ParseSpan Job-WCSSKS \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 4 104.15 ns 1.653 ns 1.546 ns 104.46 ns 101.20 ns 106.70 ns 1.00 0.03 - NA
ParseHex Job-EAKIVL \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 7FFFFFFF 282.46 ns 6.058 ns 6.976 ns 279.90 ns 271.79 ns 294.80 ns 1.00 0.00 - NA
ParseHex Job-WCSSKS \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 7FFFFFFF 284.45 ns 5.894 ns 6.053 ns 285.43 ns 273.65 ns 297.39 ns 1.01 0.03 - NA
ParseHex Job-EAKIVL \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 80000000 283.17 ns 5.375 ns 5.028 ns 282.32 ns 271.30 ns 290.87 ns 1.00 0.00 - NA
ParseHex Job-WCSSKS \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 80000000 294.50 ns 6.312 ns 7.269 ns 294.38 ns 281.02 ns 310.31 ns 1.04 0.03 - NA

Perf_Int64

Method Job Toolchain value Mean Error StdDev Median Min Max Ratio RatioSD Allocated Alloc Ratio
Parse Job-ILDBBX \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe -9223372036854775808 315.1 ns 4.98 ns 4.41 ns 315.5 ns 305.7 ns 320.1 ns 1.00 0.00 - NA
Parse Job-BSIVGC \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe -9223372036854775808 368.2 ns 13.84 ns 15.94 ns 367.7 ns 341.0 ns 397.4 ns 1.17 0.06 - NA
ParseSpan Job-ILDBBX \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe -9223372036854775808 334.2 ns 12.36 ns 14.23 ns 332.4 ns 310.7 ns 358.2 ns 1.00 0.00 - NA
ParseSpan Job-BSIVGC \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe -9223372036854775808 330.1 ns 8.76 ns 10.08 ns 331.1 ns 314.4 ns 354.1 ns 0.99 0.04 - NA
Parse Job-ILDBBX \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 12345 140.7 ns 3.10 ns 3.32 ns 140.1 ns 134.9 ns 147.2 ns 1.00 0.00 - NA
Parse Job-BSIVGC \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 12345 178.4 ns 1.92 ns 1.50 ns 178.9 ns 175.4 ns 180.0 ns 1.27 0.03 - NA
ParseSpan Job-ILDBBX \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 12345 147.9 ns 2.39 ns 2.12 ns 148.2 ns 143.5 ns 150.9 ns 1.00 0.00 - NA
ParseSpan Job-BSIVGC \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 12345 154.2 ns 3.29 ns 3.23 ns 154.3 ns 148.7 ns 160.4 ns 1.05 0.03 - NA
Parse Job-ILDBBX \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 9223372036854775807 312.4 ns 10.66 ns 12.27 ns 311.3 ns 295.4 ns 340.5 ns 1.00 0.00 - NA
Parse Job-BSIVGC \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 9223372036854775807 350.5 ns 8.12 ns 8.69 ns 352.0 ns 334.9 ns 367.7 ns 1.12 0.05 - NA
ParseSpan Job-ILDBBX \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 9223372036854775807 323.5 ns 16.97 ns 19.54 ns 320.4 ns 289.0 ns 354.7 ns 1.00 0.00 - NA
ParseSpan Job-BSIVGC \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 9223372036854775807 323.8 ns 8.80 ns 9.42 ns 323.3 ns 310.4 ns 343.9 ns 1.01 0.06 - NA

Perf_SByte

Method Job Toolchain value Mean Error StdDev Median Min Max Ratio RatioSD Allocated Alloc Ratio
Parse Job-AHYKFF \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe -128 151.2 ns 3.53 ns 3.92 ns 150.2 ns 146.6 ns 161.1 ns 1.00 0.00 - NA
Parse Job-XPVCTY \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe -128 172.8 ns 2.89 ns 2.41 ns 171.8 ns 170.2 ns 177.3 ns 1.14 0.04 - NA
Parse Job-AHYKFF \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 127 148.8 ns 2.83 ns 2.64 ns 148.1 ns 145.0 ns 153.0 ns 1.00 0.00 - NA
Parse Job-XPVCTY \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 127 170.7 ns 3.28 ns 2.74 ns 170.5 ns 166.2 ns 176.3 ns 1.15 0.03 - NA

Perf_UInt16

Method Job Toolchain value Mean Error StdDev Median Min Max Ratio RatioSD Allocated Alloc Ratio
Parse Job-JMVOVS \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 0 116.0 ns 3.33 ns 3.83 ns 116.7 ns 110.4 ns 122.1 ns 1.00 0.00 - NA
Parse Job-XPNLVI \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 0 119.4 ns 3.80 ns 4.38 ns 119.1 ns 111.5 ns 128.6 ns 1.03 0.04 - NA
Parse Job-JMVOVS \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 12345 165.9 ns 3.13 ns 2.92 ns 165.5 ns 160.8 ns 170.8 ns 1.00 0.00 - NA
Parse Job-XPNLVI \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 12345 186.6 ns 5.20 ns 5.99 ns 185.6 ns 176.2 ns 198.9 ns 1.12 0.06 - NA
Parse Job-JMVOVS \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 65535 166.3 ns 4.19 ns 4.66 ns 166.6 ns 159.2 ns 174.9 ns 1.00 0.00 - NA
Parse Job-XPNLVI \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 65535 181.5 ns 3.65 ns 3.23 ns 180.4 ns 177.0 ns 187.1 ns 1.10 0.04 - NA

Perf_UInt32

Method Job Toolchain value Mean Error StdDev Median Min Max Ratio RatioSD Allocated Alloc Ratio
ParseSpan Job-EAKIVL \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 0 91.22 ns 2.643 ns 3.044 ns 90.26 ns 87.84 ns 98.45 ns 1.00 0.00 - NA
ParseSpan Job-WCSSKS \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 0 93.35 ns 2.279 ns 2.624 ns 92.80 ns 89.81 ns 99.59 ns 1.02 0.05 - NA
Parse Job-EAKIVL \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 0 84.91 ns 1.864 ns 1.831 ns 85.10 ns 81.82 ns 88.05 ns 1.00 0.00 - NA
Parse Job-WCSSKS \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 0 116.70 ns 2.527 ns 2.809 ns 117.21 ns 112.55 ns 123.15 ns 1.37 0.05 - NA
ParseSpan Job-EAKIVL \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 12345 140.58 ns 2.919 ns 3.245 ns 141.01 ns 135.68 ns 146.63 ns 1.00 0.00 - NA
ParseSpan Job-WCSSKS \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 12345 146.75 ns 2.858 ns 2.673 ns 146.18 ns 142.16 ns 152.61 ns 1.04 0.04 - NA
Parse Job-EAKIVL \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 12345 135.70 ns 2.648 ns 2.476 ns 135.19 ns 132.05 ns 140.90 ns 1.00 0.00 - NA
Parse Job-WCSSKS \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 12345 168.90 ns 3.492 ns 3.736 ns 169.35 ns 162.95 ns 176.83 ns 1.25 0.03 - NA
ParseSpan Job-EAKIVL \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 4294967295 206.35 ns 6.026 ns 6.939 ns 204.19 ns 196.40 ns 221.38 ns 1.00 0.00 - NA
ParseSpan Job-WCSSKS \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 4294967295 208.49 ns 7.898 ns 9.096 ns 209.71 ns 190.45 ns 224.64 ns 1.01 0.05 - NA
Parse Job-EAKIVL \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 4294967295 188.27 ns 3.749 ns 3.506 ns 187.77 ns 182.72 ns 194.06 ns 1.00 0.00 - NA
Parse Job-WCSSKS \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 4294967295 230.91 ns 6.146 ns 7.077 ns 231.27 ns 216.84 ns 243.16 ns 1.22 0.04 - NA

Perf_UInt64

Method Job Toolchain value Mean Error StdDev Median Min Max Ratio RatioSD Allocated Alloc Ratio
ParseSpan Job-ILDBBX \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 0 93.28 ns 2.005 ns 2.146 ns 93.11 ns 89.86 ns 98.08 ns 1.00 0.00 - NA
ParseSpan Job-BSIVGC \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 0 95.94 ns 1.923 ns 1.705 ns 95.79 ns 93.73 ns 98.77 ns 1.03 0.03 - NA
Parse Job-ILDBBX \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 0 86.87 ns 1.975 ns 1.750 ns 87.26 ns 83.80 ns 89.04 ns 1.00 0.00 - NA
Parse Job-BSIVGC \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 0 116.72 ns 2.601 ns 2.555 ns 116.28 ns 112.08 ns 120.84 ns 1.34 0.04 - NA
ParseSpan Job-ILDBBX \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 12345 149.00 ns 4.248 ns 4.891 ns 147.91 ns 142.12 ns 160.63 ns 1.00 0.00 - NA
ParseSpan Job-BSIVGC \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 12345 151.21 ns 1.357 ns 1.060 ns 151.28 ns 149.11 ns 152.56 ns 1.01 0.04 - NA
Parse Job-ILDBBX \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 12345 146.81 ns 3.088 ns 3.171 ns 145.83 ns 141.44 ns 154.24 ns 1.00 0.00 - NA
Parse Job-BSIVGC \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 12345 173.66 ns 3.654 ns 3.240 ns 172.69 ns 168.40 ns 179.19 ns 1.18 0.03 - NA
ParseSpan Job-ILDBBX \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 18446744073709551615 306.80 ns 8.680 ns 9.996 ns 304.42 ns 291.18 ns 329.55 ns 1.00 0.00 - NA
ParseSpan Job-BSIVGC \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 18446744073709551615 324.00 ns 14.601 ns 16.815 ns 323.09 ns 295.95 ns 355.35 ns 1.06 0.07 - NA
Parse Job-ILDBBX \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 18446744073709551615 311.40 ns 9.527 ns 10.971 ns 311.83 ns 295.00 ns 336.69 ns 1.00 0.00 - NA
Parse Job-BSIVGC \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 18446744073709551615 343.79 ns 11.843 ns 13.639 ns 345.64 ns 322.76 ns 373.84 ns 1.10 0.05 - NA

@tannergooding
Copy link
Member Author

tannergooding commented Apr 14, 2023

Similar overall results for MonoJIT

Perf for MonoJIT

Perf_Byte

Method Job Toolchain value Mean Error StdDev Median Min Max Ratio Allocated Alloc Ratio
Parse Job-EEHCJS \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 0 10.70 ns 0.059 ns 0.049 ns 10.68 ns 10.62 ns 10.77 ns 1.00 - NA
Parse Job-WNYFDS \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 0 14.66 ns 0.046 ns 0.043 ns 14.67 ns 14.59 ns 14.74 ns 1.37 - NA
Parse Job-EEHCJS \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 255 13.29 ns 0.035 ns 0.033 ns 13.30 ns 13.24 ns 13.34 ns 1.00 - NA
Parse Job-WNYFDS \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 255 21.98 ns 0.040 ns 0.033 ns 21.98 ns 21.92 ns 22.01 ns 1.65 - NA

Perf_Int16

Method Job Toolchain value Mean Error StdDev Median Min Max Ratio Allocated Alloc Ratio
Parse Job-BHIHWW \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe -32768 16.91 ns 0.163 ns 0.152 ns 16.84 ns 16.72 ns 17.22 ns 1.00 - NA
Parse Job-DGPFBY \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe -32768 26.43 ns 0.095 ns 0.084 ns 26.42 ns 26.29 ns 26.60 ns 1.56 - NA
Parse Job-BHIHWW \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 0 11.33 ns 0.058 ns 0.054 ns 11.32 ns 11.23 ns 11.42 ns 1.00 - NA
Parse Job-DGPFBY \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 0 15.48 ns 0.081 ns 0.068 ns 15.50 ns 15.38 ns 15.58 ns 1.37 - NA
Parse Job-BHIHWW \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 32767 16.62 ns 0.051 ns 0.040 ns 16.61 ns 16.56 ns 16.68 ns 1.00 - NA
Parse Job-DGPFBY \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 32767 25.85 ns 0.097 ns 0.086 ns 25.83 ns 25.72 ns 25.98 ns 1.56 - NA

Perf_Int32

Method Job Toolchain value Mean Error StdDev Median Min Max Ratio RatioSD Allocated Alloc Ratio
Parse Job-ZUGTID \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe -2147483648 23.24 ns 0.117 ns 0.104 ns 23.21 ns 23.13 ns 23.44 ns 1.00 0.00 - NA
Parse Job-ZMAZZJ \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe -2147483648 27.86 ns 0.107 ns 0.095 ns 27.84 ns 27.70 ns 28.06 ns 1.20 0.01 - NA
ParseSpan Job-ZUGTID \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe -2147483648 24.99 ns 0.085 ns 0.076 ns 24.96 ns 24.88 ns 25.11 ns 1.00 0.00 - NA
ParseSpan Job-ZMAZZJ \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe -2147483648 25.11 ns 0.043 ns 0.038 ns 25.12 ns 25.01 ns 25.15 ns 1.00 0.00 - NA
Parse Job-ZUGTID \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 12345 16.40 ns 0.044 ns 0.041 ns 16.40 ns 16.34 ns 16.48 ns 1.00 0.00 - NA
Parse Job-ZMAZZJ \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 12345 21.28 ns 0.256 ns 0.239 ns 21.22 ns 21.01 ns 21.78 ns 1.30 0.01 - NA
ParseSpan Job-ZUGTID \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 12345 19.02 ns 0.255 ns 0.238 ns 19.01 ns 18.65 ns 19.40 ns 1.00 0.00 - NA
ParseSpan Job-ZMAZZJ \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 12345 18.05 ns 0.119 ns 0.112 ns 18.02 ns 17.90 ns 18.26 ns 0.95 0.01 - NA
Parse Job-ZUGTID \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 2147483647 22.76 ns 0.053 ns 0.050 ns 22.77 ns 22.68 ns 22.84 ns 1.00 0.00 - NA
Parse Job-ZMAZZJ \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 2147483647 27.61 ns 0.177 ns 0.166 ns 27.62 ns 27.33 ns 27.89 ns 1.21 0.01 - NA
ParseSpan Job-ZUGTID \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 2147483647 25.03 ns 0.234 ns 0.219 ns 25.05 ns 24.69 ns 25.51 ns 1.00 0.00 - NA
ParseSpan Job-ZMAZZJ \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 2147483647 24.85 ns 0.085 ns 0.080 ns 24.82 ns 24.77 ns 25.01 ns 0.99 0.01 - NA
ParseHex Job-ZUGTID \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 3039 56.26 ns 0.504 ns 0.471 ns 56.33 ns 55.45 ns 57.15 ns 1.00 0.00 - NA
ParseHex Job-ZMAZZJ \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 3039 56.54 ns 0.561 ns 0.525 ns 56.43 ns 55.89 ns 57.82 ns 1.01 0.01 - NA
Parse Job-ZUGTID \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 4 11.05 ns 0.060 ns 0.056 ns 11.06 ns 10.95 ns 11.15 ns 1.00 0.00 - NA
Parse Job-ZMAZZJ \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 4 15.44 ns 0.065 ns 0.051 ns 15.43 ns 15.38 ns 15.53 ns 1.40 0.01 - NA
ParseHex Job-ZUGTID \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 4 20.53 ns 0.051 ns 0.045 ns 20.53 ns 20.44 ns 20.59 ns 1.00 0.00 - NA
ParseHex Job-ZMAZZJ \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 4 22.09 ns 0.174 ns 0.154 ns 22.03 ns 21.95 ns 22.44 ns 1.08 0.01 - NA
ParseSpan Job-ZUGTID \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 4 13.80 ns 0.070 ns 0.054 ns 13.79 ns 13.68 ns 13.87 ns 1.00 0.00 - NA
ParseSpan Job-ZMAZZJ \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 4 12.99 ns 0.165 ns 0.154 ns 12.96 ns 12.79 ns 13.30 ns 0.94 0.02 - NA
ParseHex Job-ZUGTID \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 7FFFFFFF 99.16 ns 1.105 ns 1.034 ns 99.05 ns 97.69 ns 101.22 ns 1.00 0.00 - NA
ParseHex Job-ZMAZZJ \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 7FFFFFFF 106.46 ns 1.418 ns 1.327 ns 106.49 ns 104.56 ns 108.70 ns 1.07 0.02 - NA
ParseHex Job-ZUGTID \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 80000000 100.61 ns 0.423 ns 0.375 ns 100.53 ns 99.99 ns 101.47 ns 1.00 0.00 - NA
ParseHex Job-ZMAZZJ \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 80000000 109.96 ns 0.780 ns 0.730 ns 109.94 ns 109.01 ns 111.45 ns 1.09 0.01 - NA

Perf_Int64

Method Job Toolchain value Mean Error StdDev Median Min Max Ratio Allocated Alloc Ratio
Parse Job-TYCDZG \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe -9223372036854775808 36.64 ns 0.293 ns 0.274 ns 36.63 ns 36.33 ns 37.05 ns 1.00 - NA
Parse Job-KLBQHZ \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe -9223372036854775808 46.28 ns 0.114 ns 0.106 ns 46.30 ns 46.12 ns 46.49 ns 1.26 - NA
ParseSpan Job-TYCDZG \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe -9223372036854775808 38.05 ns 0.089 ns 0.083 ns 38.01 ns 37.96 ns 38.20 ns 1.00 - NA
ParseSpan Job-KLBQHZ \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe -9223372036854775808 43.72 ns 0.137 ns 0.107 ns 43.72 ns 43.52 ns 43.91 ns 1.15 - NA
Parse Job-TYCDZG \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 12345 16.73 ns 0.045 ns 0.039 ns 16.74 ns 16.69 ns 16.83 ns 1.00 - NA
Parse Job-KLBQHZ \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 12345 23.72 ns 0.151 ns 0.134 ns 23.67 ns 23.57 ns 24.02 ns 1.42 - NA
ParseSpan Job-TYCDZG \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 12345 18.35 ns 0.093 ns 0.082 ns 18.34 ns 18.23 ns 18.50 ns 1.00 - NA
ParseSpan Job-KLBQHZ \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 12345 20.02 ns 0.193 ns 0.161 ns 19.98 ns 19.84 ns 20.43 ns 1.09 - NA
Parse Job-TYCDZG \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 9223372036854775807 35.96 ns 0.113 ns 0.105 ns 35.95 ns 35.81 ns 36.15 ns 1.00 - NA
Parse Job-KLBQHZ \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 9223372036854775807 45.96 ns 0.210 ns 0.197 ns 45.89 ns 45.67 ns 46.38 ns 1.28 - NA
ParseSpan Job-TYCDZG \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 9223372036854775807 37.88 ns 0.161 ns 0.151 ns 37.92 ns 37.69 ns 38.08 ns 1.00 - NA
ParseSpan Job-KLBQHZ \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 9223372036854775807 43.04 ns 0.114 ns 0.107 ns 43.01 ns 42.85 ns 43.23 ns 1.14 - NA

Perf_SByte

Method Job Toolchain value Mean Error StdDev Median Min Max Ratio Allocated Alloc Ratio
Parse Job-EEHCJS \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe -128 15.17 ns 0.042 ns 0.038 ns 15.18 ns 15.12 ns 15.23 ns 1.00 - NA
Parse Job-WNYFDS \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe -128 22.08 ns 0.068 ns 0.061 ns 22.07 ns 22.01 ns 22.23 ns 1.46 - NA
Parse Job-EEHCJS \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 127 13.99 ns 0.044 ns 0.041 ns 13.98 ns 13.92 ns 14.06 ns 1.00 - NA
Parse Job-WNYFDS \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 127 21.20 ns 0.063 ns 0.058 ns 21.18 ns 21.13 ns 21.29 ns 1.52 - NA

Perf_UInt16

Method Job Toolchain value Mean Error StdDev Median Min Max Ratio RatioSD Allocated Alloc Ratio
Parse Job-BHIHWW \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 0 11.21 ns 0.058 ns 0.054 ns 11.20 ns 11.11 ns 11.30 ns 1.00 0.00 - NA
Parse Job-DGPFBY \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 0 14.90 ns 0.051 ns 0.043 ns 14.88 ns 14.84 ns 14.99 ns 1.33 0.01 - NA
Parse Job-BHIHWW \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 12345 15.76 ns 0.057 ns 0.048 ns 15.76 ns 15.66 ns 15.83 ns 1.00 0.00 - NA
Parse Job-DGPFBY \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 12345 27.91 ns 0.250 ns 0.234 ns 27.85 ns 27.54 ns 28.37 ns 1.77 0.02 - NA
Parse Job-BHIHWW \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 65535 16.21 ns 0.096 ns 0.085 ns 16.21 ns 16.09 ns 16.37 ns 1.00 0.00 - NA
Parse Job-DGPFBY \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 65535 27.75 ns 0.091 ns 0.085 ns 27.76 ns 27.61 ns 27.88 ns 1.71 0.01 - NA

Perf_UInt32

Method Job Toolchain value Mean Error StdDev Median Min Max Ratio Allocated Alloc Ratio
ParseSpan Job-ZUGTID \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 0 13.90 ns 0.138 ns 0.129 ns 13.92 ns 13.66 ns 14.19 ns 1.00 - NA
ParseSpan Job-ZMAZZJ \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 0 12.55 ns 0.066 ns 0.062 ns 12.53 ns 12.45 ns 12.69 ns 0.90 - NA
Parse Job-ZUGTID \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 0 10.68 ns 0.034 ns 0.031 ns 10.67 ns 10.64 ns 10.74 ns 1.00 - NA
Parse Job-ZMAZZJ \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 0 14.86 ns 0.060 ns 0.054 ns 14.85 ns 14.75 ns 14.94 ns 1.39 - NA
ParseSpan Job-ZUGTID \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 12345 17.33 ns 0.075 ns 0.066 ns 17.33 ns 17.22 ns 17.43 ns 1.00 - NA
ParseSpan Job-ZMAZZJ \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 12345 20.44 ns 0.037 ns 0.033 ns 20.44 ns 20.38 ns 20.51 ns 1.18 - NA
Parse Job-ZUGTID \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 12345 15.79 ns 0.066 ns 0.051 ns 15.81 ns 15.71 ns 15.88 ns 1.00 - NA
Parse Job-ZMAZZJ \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 12345 23.42 ns 0.099 ns 0.088 ns 23.38 ns 23.32 ns 23.62 ns 1.48 - NA
ParseSpan Job-ZUGTID \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 4294967295 23.51 ns 0.075 ns 0.070 ns 23.52 ns 23.36 ns 23.60 ns 1.00 - NA
ParseSpan Job-ZMAZZJ \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 4294967295 31.90 ns 0.090 ns 0.084 ns 31.95 ns 31.73 ns 32.02 ns 1.36 - NA
Parse Job-ZUGTID \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 4294967295 21.53 ns 0.060 ns 0.054 ns 21.52 ns 21.46 ns 21.65 ns 1.00 - NA
Parse Job-ZMAZZJ \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 4294967295 34.42 ns 0.209 ns 0.175 ns 34.39 ns 34.15 ns 34.78 ns 1.60 - NA

Perf_UInt64

Method Job Toolchain value Mean Error StdDev Median Min Max Ratio Allocated Alloc Ratio
ParseSpan Job-TYCDZG \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 0 13.21 ns 0.044 ns 0.039 ns 13.21 ns 13.14 ns 13.27 ns 1.00 - NA
ParseSpan Job-KLBQHZ \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 0 12.19 ns 0.064 ns 0.060 ns 12.17 ns 12.10 ns 12.30 ns 0.92 - NA
Parse Job-TYCDZG \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 0 10.84 ns 0.053 ns 0.047 ns 10.84 ns 10.77 ns 10.93 ns 1.00 - NA
Parse Job-KLBQHZ \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 0 14.80 ns 0.073 ns 0.065 ns 14.77 ns 14.73 ns 14.93 ns 1.37 - NA
ParseSpan Job-TYCDZG \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 12345 17.85 ns 0.058 ns 0.054 ns 17.84 ns 17.76 ns 17.94 ns 1.00 - NA
ParseSpan Job-KLBQHZ \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 12345 20.97 ns 0.094 ns 0.078 ns 20.95 ns 20.87 ns 21.16 ns 1.17 - NA
Parse Job-TYCDZG \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 12345 15.96 ns 0.093 ns 0.082 ns 15.94 ns 15.85 ns 16.12 ns 1.00 - NA
Parse Job-KLBQHZ \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 12345 23.95 ns 0.102 ns 0.095 ns 23.93 ns 23.80 ns 24.14 ns 1.50 - NA
ParseSpan Job-TYCDZG \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 18446744073709551615 36.82 ns 0.149 ns 0.139 ns 36.82 ns 36.61 ns 37.02 ns 1.00 - NA
ParseSpan Job-KLBQHZ \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 18446744073709551615 52.52 ns 0.296 ns 0.262 ns 52.45 ns 52.23 ns 53.04 ns 1.43 - NA
Parse Job-TYCDZG \runtime-base\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 18446744073709551615 35.02 ns 0.202 ns 0.169 ns 34.99 ns 34.81 ns 35.35 ns 1.00 - NA
Parse Job-KLBQHZ \runtime\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe 18446744073709551615 55.62 ns 0.588 ns 0.521 ns 55.52 ns 54.97 ns 56.42 ns 1.59 - NA

@tannergooding
Copy link
Member Author

tannergooding commented Apr 14, 2023

CC. @SamMonoRT for input on the MonoInterpreter/MonoJIT results above?

Its about a 30ns regression in the worst case. Reintroducing the validation duplication brings it down to about a 5ns regression, but brings back about 300 lines of code and makes the code atypical to a lot of other code in the BCL and community apps.

We certainly can do this, if there are concerns about the regression; but long term this seems like another common pattern that Mono would ideally handle.

-- Noting that outside the args validation, we are seeing perf wins in the interpreter for some of the ParseSpan cases, since those aren't just overloads deferring validation to a different API.

@SamMonoRT
Copy link
Member

Thanks @tannergooding - these regressions are acceptable given the scope of the changes. Are you targeting wasm-aot runs too?

@tannergooding tannergooding removed the NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) label Apr 15, 2023
@tannergooding
Copy link
Member Author

Are you targeting wasm-aot runs too?

Haven't yet, let me get those numbers as well.

@tannergooding
Copy link
Member Author

@SamMonoRT, don't currently have a Unix machine setup so I won't be able to test until sometime next week.

Trying to run on windows ends up hitting:

// * WasmToolchain is supported only on Unix, benchmark 'Perf_Int16.Parse: Job-CFBICZ(PowerPlanMode=00000000-0000-0000-0000-000000000000, Runtime=Wasm, Toolchain=Wasm, IterationTime=250.0000 ms, MaxIterationCount=20, MinIterationCount=15, WarmupCount=1) [value=-32768]' might not work correctly

There are also a couple other quirks (which I tried working around), such as:

[2023/04/14 18:06:04][INFO] Error:
[2023/04/14 18:06:04][INFO] An assembly specified in the application dependencies manifest (MicroBenchmarks.deps.json) has already been found but with a different file extension:
[2023/04/14 18:06:04][INFO] package: 'MicroBenchmarks', version: '1.0.0-dev'
[2023/04/14 18:06:04][INFO] path: 'MicroBenchmarks.dll'
[2023/04/14 18:06:04][INFO] previously found assembly: 'C:\Users\tagoo\source\repos\performance\artifacts\bin\for-running\MicroBenchmarks\MicroBenchmarks.exe'

Ideally this would work and be testable on Windows as well, since that is one of the primary development environments for many users.

@tannergooding
Copy link
Member Author

@SamMonoRT, I'm not able to get the wasm-aot benchmarks working in WSL following the instructions given. Seeing:

Unhandled exception. System.ComponentModel.Win32Exception (2): An error occurred trying to start process 'v8' with working directory '/home/tagoo/repos/performance/artifacts/bin/for-running/MicroBenchmarks/aef9baff-cb7d-44f7-b0fc-e6bed5053b0e/bin/net8.0/browser-wasm/AppBundle'. No such file or directory

@SamMonoRT
Copy link
Member

@SamMonoRT, I'm not able to get the wasm-aot benchmarks working in WSL following the instructions given. Seeing:

Unhandled exception. System.ComponentModel.Win32Exception (2): An error occurred trying to start process 'v8' with working directory '/home/tagoo/repos/performance/artifacts/bin/for-running/MicroBenchmarks/aef9baff-cb7d-44f7-b0fc-e6bed5053b0e/bin/net8.0/browser-wasm/AppBundle'. No such file or directory

cc @lewing @pavelsavara @radekdoulik

Copy link
Member

@jeffhandley jeffhandley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @tannergooding! I appreciate you reverting the throw helper approach and also gathering the mono perf numbers and looking at how different approaches have trade-offs.

@stephentoub
Copy link
Member

Given that we've gathered perf numbers on a variety of coreclr and mono backends and the numbers looked good, and CI is green, and Tanner's tried to get wasm-aot numbers and is blocked from doing so, I think it's reasonable to merge.

@tannergooding tannergooding merged commit 07834fd into dotnet:main Apr 17, 2023
@tannergooding
Copy link
Member Author

Will react to and handle any uncaught impact as needed.

@radekdoulik
Copy link
Member

@SamMonoRT, I'm not able to get the wasm-aot benchmarks working in WSL following the instructions given. Seeing:

Unhandled exception. System.ComponentModel.Win32Exception (2): An error occurred trying to start process 'v8' with working directory '/home/tagoo/repos/performance/artifacts/bin/for-running/MicroBenchmarks/aef9baff-cb7d-44f7-b0fc-e6bed5053b0e/bin/net8.0/browser-wasm/AppBundle'. No such file or directory

It looks like you are missing v8 engine. I have opened dotnet/performance#2974 to mention it in the workflow doc.

@EgorBo
Copy link
Member

EgorBo commented Apr 20, 2023

@ghost ghost locked as resolved and limited conversation to collaborators May 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants