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

Add a tiny bytes::Bytes like implementation #590

Merged
merged 1 commit into from
Aug 26, 2024

Conversation

bantonsson
Copy link
Contributor

@bantonsson bantonsson commented Aug 20, 2024

What does this PR do?

Adds a tiny bytes::Bytes like implementation for having multiple byte slices pointing into the same slice.

Motivation

The implementation in bytes::Bytes does not allow us to use the mapped memory types in the ipc crate, and implementing support for such types in the original crate is a not an option, since it is non trivial and there is a large amount of functionality that doesn't map well to the mapped memory.

Additional Notes

Jira ticket: APMS-1330

How to test the change?

There are tests.

@bantonsson bantonsson marked this pull request as ready for review August 20, 2024 14:44
@bantonsson bantonsson requested review from a team as code owners August 20, 2024 14:44
@bantonsson bantonsson force-pushed the ban/tiny-bytes-implementation branch from a69e24b to 2670283 Compare August 20, 2024 14:46
@pr-commenter
Copy link

pr-commenter bot commented Aug 20, 2024

Benchmarks

Comparison

Benchmark execution time: 2024-08-26 11:56:50

Comparing candidate commit 80b0502 in PR branch ban/tiny-bytes-implementation with baseline commit d99a69e in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 50 metrics, 2 unstable metrics.

Candidate

Candidate benchmark details

Group 1

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 80b0502 1724672817 ban/tiny-bytes-implementation
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
write only interface execution_time 1.460µs 2.960µs ± 1.447µs 2.795µs ± 0.026µs 2.819µs 3.031µs 12.915µs 16.570µs 492.86% 7.992 64.288 48.76% 0.102µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
write only interface execution_time [2.759µs; 3.160µs] or [-6.774%; +6.774%] None None None

Group 2

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 80b0502 1724672817 ban/tiny-bytes-implementation
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... execution_time 618.589µs 619.802µs ± 0.845µs 619.602µs ± 0.600µs 620.425µs 621.305µs 622.320µs 622.613µs 0.49% 0.778 0.154 0.14% 0.060µs 1 200
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput 1606134.320op/s 1613420.378op/s ± 2196.420op/s 1613939.358op/s ± 1563.438op/s 1615235.548op/s 1616106.018op/s 1616507.661op/s 1616583.125op/s 0.16% -0.772 0.136 0.14% 155.310op/s 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time 386.364µs 388.655µs ± 0.986µs 388.639µs ± 0.690µs 389.301µs 390.503µs 390.983µs 391.382µs 0.71% 0.297 -0.272 0.25% 0.070µs 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput 2555050.301op/s 2572994.328op/s ± 6522.047op/s 2573081.662op/s ± 4559.924op/s 2577851.029op/s 2582570.594op/s 2585321.044op/s 2588234.990op/s 0.59% -0.285 -0.283 0.25% 461.178op/s 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time 190.943µs 191.453µs ± 0.219µs 191.432µs ± 0.132µs 191.581µs 191.880µs 192.034µs 192.119µs 0.36% 0.454 0.453 0.11% 0.015µs 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput 5205110.725op/s 5223225.013op/s ± 5964.763op/s 5223787.037op/s ± 3598.831op/s 5226821.259op/s 5233009.195op/s 5235474.044op/s 5237166.424op/s 0.26% -0.447 0.444 0.11% 421.772op/s 1 200
normalization/normalize_service/normalize_service/[empty string] execution_time 44.887µs 45.159µs ± 0.096µs 45.175µs ± 0.076µs 45.231µs 45.293µs 45.327µs 45.339µs 0.36% -0.373 -0.784 0.21% 0.007µs 1 200
normalization/normalize_service/normalize_service/[empty string] throughput 22055927.531op/s 22143990.989op/s ± 47183.090op/s 22136200.257op/s ± 37168.402op/s 22181810.848op/s 22226126.437op/s 22239832.923op/s 22278289.250op/s 0.64% 0.380 -0.777 0.21% 3336.348op/s 1 200
normalization/normalize_service/normalize_service/test_ASCII execution_time 48.921µs 49.194µs ± 0.155µs 49.170µs ± 0.084µs 49.263µs 49.494µs 49.706µs 49.897µs 1.48% 1.250 2.437 0.31% 0.011µs 1 200
normalization/normalize_service/normalize_service/test_ASCII throughput 20041186.970op/s 20327766.533op/s ± 63678.822op/s 20337570.567op/s ± 34974.586op/s 20369209.712op/s 20412078.325op/s 20422877.444op/s 20441211.669op/s 0.51% -1.223 2.329 0.31% 4502.773op/s 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... execution_time [619.685µs; 619.919µs] or [-0.019%; +0.019%] None None None
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput [1613115.975op/s; 1613724.780op/s] or [-0.019%; +0.019%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time [388.518µs; 388.791µs] or [-0.035%; +0.035%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput [2572090.435op/s; 2573898.221op/s] or [-0.035%; +0.035%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time [191.423µs; 191.483µs] or [-0.016%; +0.016%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput [5222398.355op/s; 5224051.672op/s] or [-0.016%; +0.016%] None None None
normalization/normalize_service/normalize_service/[empty string] execution_time [45.146µs; 45.173µs] or [-0.030%; +0.030%] None None None
normalization/normalize_service/normalize_service/[empty string] throughput [22137451.867op/s; 22150530.112op/s] or [-0.030%; +0.030%] None None None
normalization/normalize_service/normalize_service/test_ASCII execution_time [49.173µs; 49.216µs] or [-0.044%; +0.044%] None None None
normalization/normalize_service/normalize_service/test_ASCII throughput [20318941.261op/s; 20336591.805op/s] or [-0.043%; +0.043%] None None None

Group 3

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 80b0502 1724672817 ban/tiny-bytes-implementation
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
normalization/normalize_trace/test_trace execution_time 300.885ns 311.778ns ± 11.810ns 306.369ns ± 3.937ns 314.864ns 341.435ns 342.962ns 343.476ns 12.11% 1.451 1.023 3.78% 0.835ns 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
normalization/normalize_trace/test_trace execution_time [310.141ns; 313.415ns] or [-0.525%; +0.525%] None None None

Group 4

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 80b0502 1724672817 ban/tiny-bytes-implementation
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
tags/replace_trace_tags execution_time 2.640µs 2.702µs ± 0.022µs 2.702µs ± 0.007µs 2.707µs 2.744µs 2.747µs 2.751µs 1.79% -0.246 1.362 0.80% 0.002µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
tags/replace_trace_tags execution_time [2.700µs; 2.705µs] or [-0.111%; +0.111%] None None None

Group 5

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 80b0502 1724672817 ban/tiny-bytes-implementation
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... execution_time 311.446µs 314.039µs ± 0.869µs 314.144µs ± 0.569µs 314.587µs 315.353µs 315.961µs 316.280µs 0.68% -0.223 -0.035 0.28% 0.061µs 1 200
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput 3161758.098op/s 3184340.561op/s ± 8820.800op/s 3183254.319op/s ± 5779.332op/s 3190227.597op/s 3199122.515op/s 3205590.855op/s 3210829.882op/s 0.87% 0.239 -0.028 0.28% 623.725op/s 1 200
normalization/normalize_name/normalize_name/bad-name execution_time 27.965µs 28.067µs ± 0.215µs 28.054µs ± 0.034µs 28.086µs 28.122µs 28.148µs 31.024µs 10.59% 13.179 179.231 0.76% 0.015µs 1 200
normalization/normalize_name/normalize_name/bad-name throughput 32233339.625op/s 35631531.512op/s ± 247679.736op/s 35645437.015op/s ± 43260.876op/s 35689905.171op/s 35740853.256op/s 35753642.349op/s 35759095.102op/s 0.32% -12.999 175.966 0.69% 17513.602op/s 1 200
normalization/normalize_name/normalize_name/good execution_time 16.704µs 16.733µs ± 0.034µs 16.719µs ± 0.005µs 16.728µs 16.820µs 16.846µs 16.874µs 0.93% 2.085 3.683 0.20% 0.002µs 1 200
normalization/normalize_name/normalize_name/good throughput 59261282.997op/s 59760702.004op/s ± 121561.242op/s 59810961.884op/s ± 18574.640op/s 59827011.211op/s 59845826.501op/s 59860223.436op/s 59866963.431op/s 0.09% -2.077 3.640 0.20% 8595.678op/s 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... execution_time [313.919µs; 314.160µs] or [-0.038%; +0.038%] None None None
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput [3183118.083op/s; 3185563.039op/s] or [-0.038%; +0.038%] None None None
normalization/normalize_name/normalize_name/bad-name execution_time [28.037µs; 28.096µs] or [-0.106%; +0.106%] None None None
normalization/normalize_name/normalize_name/bad-name throughput [35597205.482op/s; 35665857.541op/s] or [-0.096%; +0.096%] None None None
normalization/normalize_name/normalize_name/good execution_time [16.729µs; 16.738µs] or [-0.028%; +0.028%] None None None
normalization/normalize_name/normalize_name/good throughput [59743854.785op/s; 59777549.224op/s] or [-0.028%; +0.028%] None None None

Group 6

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 80b0502 1724672817 ban/tiny-bytes-implementation
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
redis/obfuscate_redis_string execution_time 38.501µs 39.219µs ± 1.376µs 38.581µs ± 0.045µs 38.651µs 42.194µs 42.210µs 42.666µs 10.59% 1.698 0.911 3.50% 0.097µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
redis/obfuscate_redis_string execution_time [39.029µs; 39.410µs] or [-0.486%; +0.486%] None None None

Group 7

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 80b0502 1724672817 ban/tiny-bytes-implementation
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
two way interface execution_time 17.343µs 23.680µs ± 14.715µs 17.659µs ± 0.161µs 17.977µs 53.971µs 56.895µs 131.369µs 643.93% 3.476 16.893 61.99% 1.041µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
two way interface execution_time [21.641µs; 25.720µs] or [-8.612%; +8.612%] None None None

Group 8

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 80b0502 1724672817 ban/tiny-bytes-implementation
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
sql/obfuscate_sql_string execution_time 74.556µs 74.824µs ± 0.156µs 74.814µs ± 0.061µs 74.876µs 74.966µs 75.300µs 76.333µs 2.03% 4.868 43.140 0.21% 0.011µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
sql/obfuscate_sql_string execution_time [74.802µs; 74.846µs] or [-0.029%; +0.029%] None None None

Group 9

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 80b0502 1724672817 ban/tiny-bytes-implementation
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
benching string interning on wordpress profile execution_time 137.856µs 138.259µs ± 0.187µs 138.245µs ± 0.109µs 138.361µs 138.559µs 138.722µs 139.448µs 0.87% 1.550 7.347 0.13% 0.013µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
benching string interning on wordpress profile execution_time [138.233µs; 138.285µs] or [-0.019%; +0.019%] None None None

Group 10

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 80b0502 1724672817 ban/tiny-bytes-implementation
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
credit_card/is_card_number/ execution_time 1.613µs 1.614µs ± 0.000µs 1.614µs ± 0.000µs 1.614µs 1.614µs 1.615µs 1.615µs 0.07% 0.352 -0.641 0.03% 0.000µs 1 200
credit_card/is_card_number/ throughput 619303026.760op/s 619756715.718op/s ± 170575.258op/s 619767244.802op/s ± 132024.912op/s 619895344.531op/s 619984669.062op/s 620031009.161op/s 620106728.003op/s 0.05% -0.351 -0.642 0.03% 12061.492op/s 1 200
credit_card/is_card_number/ 3782-8224-6310-005 execution_time 104.091µs 105.226µs ± 0.777µs 104.982µs ± 0.257µs 105.352µs 107.121µs 107.734µs 107.998µs 2.87% 1.718 2.357 0.74% 0.055µs 1 200
credit_card/is_card_number/ 3782-8224-6310-005 throughput 9259408.168op/s 9503833.923op/s ± 69315.150op/s 9525472.074op/s ± 23368.818op/s 9546630.996op/s 9567042.122op/s 9597438.843op/s 9606967.823op/s 0.86% -1.687 2.253 0.73% 4901.321op/s 1 200
credit_card/is_card_number/ 378282246310005 execution_time 96.031µs 97.080µs ± 0.675µs 96.899µs ± 0.270µs 97.191µs 98.710µs 99.183µs 99.486µs 2.67% 1.654 2.430 0.69% 0.048µs 1 200
credit_card/is_card_number/ 378282246310005 throughput 10051639.331op/s 10301287.671op/s ± 70860.870op/s 10320076.171op/s ± 28866.286op/s 10343933.334op/s 10379172.686op/s 10397035.643op/s 10413331.147op/s 0.90% -1.619 2.319 0.69% 5010.620op/s 1 200
credit_card/is_card_number/37828224631 execution_time 1.613µs 1.614µs ± 0.003µs 1.613µs ± 0.000µs 1.614µs 1.614µs 1.615µs 1.657µs 2.68% 13.534 185.674 0.19% 0.000µs 1 200
credit_card/is_card_number/37828224631 throughput 603632429.729op/s 619687089.383op/s ± 1155536.792op/s 619785806.919op/s ± 137651.172op/s 619920404.042op/s 620007578.539op/s 620081396.038op/s 620094048.598op/s 0.05% -13.508 185.190 0.19% 81708.790op/s 1 200
credit_card/is_card_number/378282246310005 execution_time 94.112µs 95.309µs ± 0.662µs 95.202µs ± 0.429µs 95.740µs 96.514µs 97.196µs 97.640µs 2.56% 0.850 0.708 0.69% 0.047µs 1 200
credit_card/is_card_number/378282246310005 throughput 10241720.052op/s 10492720.146op/s ± 72500.015op/s 10504024.254op/s ± 47289.629op/s 10545052.383op/s 10589791.764op/s 10610259.499op/s 10625678.013op/s 1.16% -0.809 0.599 0.69% 5126.525op/s 1 200
credit_card/is_card_number/37828224631000521389798 execution_time 94.102µs 94.598µs ± 0.358µs 94.491µs ± 0.176µs 94.777µs 95.204µs 95.454µs 97.133µs 2.80% 2.329 11.540 0.38% 0.025µs 1 200
credit_card/is_card_number/37828224631000521389798 throughput 10295205.300op/s 10571195.890op/s ± 39675.104op/s 10583035.402op/s ± 19764.798op/s 10597582.169op/s 10613288.006op/s 10626343.598op/s 10626790.138op/s 0.41% -2.240 10.715 0.37% 2805.453op/s 1 200
credit_card/is_card_number/x371413321323331 execution_time 22.441µs 22.821µs ± 0.227µs 22.811µs ± 0.143µs 22.947µs 23.213µs 23.645µs 23.793µs 4.30% 1.001 2.256 0.99% 0.016µs 1 200
credit_card/is_card_number/x371413321323331 throughput 42029539.281op/s 43824011.867op/s ± 430944.057op/s 43838343.468op/s ± 272897.546op/s 44123728.084op/s 44438646.058op/s 44552345.705op/s 44562282.403op/s 1.65% -0.907 1.916 0.98% 30472.347op/s 1 200
credit_card/is_card_number_no_luhn/ execution_time 1.613µs 1.614µs ± 0.001µs 1.613µs ± 0.000µs 1.614µs 1.614µs 1.615µs 1.617µs 0.24% 2.124 10.436 0.03% 0.000µs 1 200
credit_card/is_card_number_no_luhn/ throughput 618292294.240op/s 619741700.863op/s ± 214635.157op/s 619787139.426op/s ± 141184.800op/s 619900206.877op/s 619982677.896op/s 620031868.991op/s 620123642.529op/s 0.05% -2.116 10.368 0.03% 15176.997op/s 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time 86.025µs 86.668µs ± 0.328µs 86.597µs ± 0.232µs 86.910µs 87.243µs 87.462µs 87.639µs 1.20% 0.454 -0.472 0.38% 0.023µs 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput 11410470.937op/s 11538417.777op/s ± 43587.384op/s 11547683.222op/s ± 31020.072op/s 11571720.169op/s 11600597.788op/s 11610858.012op/s 11624581.340op/s 0.67% -0.439 -0.493 0.38% 3082.094op/s 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time 79.041µs 80.176µs ± 0.565µs 80.118µs ± 0.389µs 80.568µs 81.118µs 81.681µs 82.179µs 2.57% 0.549 0.323 0.70% 0.040µs 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 throughput 12168596.785op/s 12473173.690op/s ± 87533.868op/s 12481518.621op/s ± 60606.114op/s 12536842.961op/s 12600343.364op/s 12646060.674op/s 12651704.053op/s 1.36% -0.507 0.238 0.70% 6189.579op/s 1 200
credit_card/is_card_number_no_luhn/37828224631 execution_time 1.613µs 1.613µs ± 0.000µs 1.613µs ± 0.000µs 1.614µs 1.614µs 1.615µs 1.616µs 0.14% 0.740 0.937 0.03% 0.000µs 1 200
credit_card/is_card_number_no_luhn/37828224631 throughput 618931967.322op/s 619770910.603op/s ± 191711.838op/s 619819253.245op/s ± 148501.705op/s 619925885.496op/s 620003175.353op/s 620104292.505op/s 620138189.645op/s 0.05% -0.737 0.928 0.03% 13556.074op/s 1 200
credit_card/is_card_number_no_luhn/378282246310005 execution_time 77.118µs 78.499µs ± 0.643µs 78.433µs ± 0.457µs 78.920µs 79.616µs 80.052µs 80.231µs 2.29% 0.370 -0.370 0.82% 0.045µs 1 200
credit_card/is_card_number_no_luhn/378282246310005 throughput 12463973.760op/s 12739900.878op/s ± 104089.234op/s 12749735.482op/s ± 74405.049op/s 12821457.374op/s 12895056.160op/s 12921540.663op/s 12967134.696op/s 1.71% -0.333 -0.408 0.81% 7360.220op/s 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time 94.273µs 94.611µs ± 0.284µs 94.546µs ± 0.167µs 94.762µs 95.187µs 95.479µs 95.916µs 1.45% 1.353 2.299 0.30% 0.020µs 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput 10425802.563op/s 10569688.722op/s ± 31617.781op/s 10576858.893op/s ± 18707.169op/s 10594063.087op/s 10603599.500op/s 10606410.918op/s 10607454.919op/s 0.29% -1.331 2.193 0.30% 2235.715op/s 1 200
credit_card/is_card_number_no_luhn/x371413321323331 execution_time 22.444µs 22.829µs ± 0.229µs 22.812µs ± 0.136µs 22.935µs 23.293µs 23.441µs 23.496µs 3.00% 0.671 0.206 1.00% 0.016µs 1 200
credit_card/is_card_number_no_luhn/x371413321323331 throughput 42560538.973op/s 43809255.387op/s ± 437551.482op/s 43836067.466op/s ± 263363.707op/s 44103176.720op/s 44436131.578op/s 44534348.650op/s 44556070.313op/s 1.64% -0.619 0.115 1.00% 30939.562op/s 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
credit_card/is_card_number/ execution_time [1.613µs; 1.614µs] or [-0.004%; +0.004%] None None None
credit_card/is_card_number/ throughput [619733075.627op/s; 619780355.808op/s] or [-0.004%; +0.004%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 execution_time [105.119µs; 105.334µs] or [-0.102%; +0.102%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 throughput [9494227.510op/s; 9513440.336op/s] or [-0.101%; +0.101%] None None None
credit_card/is_card_number/ 378282246310005 execution_time [96.986µs; 97.173µs] or [-0.096%; +0.096%] None None None
credit_card/is_card_number/ 378282246310005 throughput [10291467.036op/s; 10311108.306op/s] or [-0.095%; +0.095%] None None None
credit_card/is_card_number/37828224631 execution_time [1.613µs; 1.614µs] or [-0.027%; +0.027%] None None None
credit_card/is_card_number/37828224631 throughput [619526943.097op/s; 619847235.669op/s] or [-0.026%; +0.026%] None None None
credit_card/is_card_number/378282246310005 execution_time [95.217µs; 95.401µs] or [-0.096%; +0.096%] None None None
credit_card/is_card_number/378282246310005 throughput [10482672.341op/s; 10502767.950op/s] or [-0.096%; +0.096%] None None None
credit_card/is_card_number/37828224631000521389798 execution_time [94.548µs; 94.648µs] or [-0.052%; +0.052%] None None None
credit_card/is_card_number/37828224631000521389798 throughput [10565697.302op/s; 10576694.478op/s] or [-0.052%; +0.052%] None None None
credit_card/is_card_number/x371413321323331 execution_time [22.789µs; 22.852µs] or [-0.138%; +0.138%] None None None
credit_card/is_card_number/x371413321323331 throughput [43764287.165op/s; 43883736.569op/s] or [-0.136%; +0.136%] None None None
credit_card/is_card_number_no_luhn/ execution_time [1.613µs; 1.614µs] or [-0.005%; +0.005%] None None None
credit_card/is_card_number_no_luhn/ throughput [619711954.495op/s; 619771447.232op/s] or [-0.005%; +0.005%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time [86.623µs; 86.714µs] or [-0.052%; +0.052%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput [11532376.984op/s; 11544458.569op/s] or [-0.052%; +0.052%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time [80.098µs; 80.254µs] or [-0.098%; +0.098%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 throughput [12461042.337op/s; 12485305.042op/s] or [-0.097%; +0.097%] None None None
credit_card/is_card_number_no_luhn/37828224631 execution_time [1.613µs; 1.614µs] or [-0.004%; +0.004%] None None None
credit_card/is_card_number_no_luhn/37828224631 throughput [619744341.186op/s; 619797480.020op/s] or [-0.004%; +0.004%] None None None
credit_card/is_card_number_no_luhn/378282246310005 execution_time [78.410µs; 78.588µs] or [-0.114%; +0.114%] None None None
credit_card/is_card_number_no_luhn/378282246310005 throughput [12725475.111op/s; 12754326.645op/s] or [-0.113%; +0.113%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time [94.572µs; 94.650µs] or [-0.042%; +0.042%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput [10565306.801op/s; 10574070.642op/s] or [-0.041%; +0.041%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 execution_time [22.797µs; 22.860µs] or [-0.139%; +0.139%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 throughput [43748614.960op/s; 43869895.814op/s] or [-0.138%; +0.138%] None None None

Group 11

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 80b0502 1724672817 ban/tiny-bytes-implementation
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
benching deserializing traces from msgpack to their internal representation execution_time 1.160µs 1.368µs ± 0.064µs 1.370µs ± 0.052µs 1.414µs 1.457µs 1.472µs 1.473µs 7.51% -0.610 0.594 4.66% 0.005µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
benching deserializing traces from msgpack to their internal representation execution_time [1.359µs; 1.377µs] or [-0.648%; +0.648%] None None None

Baseline

Omitted due to size.

@codecov-commenter
Copy link

codecov-commenter commented Aug 20, 2024

Codecov Report

Attention: Patch coverage is 91.66667% with 19 lines in your changes missing coverage. Please review.

Project coverage is 72.89%. Comparing base (d99a69e) to head (80b0502).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #590      +/-   ##
==========================================
+ Coverage   72.71%   72.89%   +0.17%     
==========================================
  Files         241      243       +2     
  Lines       34427    34638     +211     
==========================================
+ Hits        25033    25248     +215     
+ Misses       9394     9390       -4     
Components Coverage Δ
crashtracker 20.61% <ø> (-0.06%) ⬇️
datadog-alloc 98.73% <ø> (ø)
data-pipeline 90.12% <ø> (ø)
data-pipeline-ffi 0.00% <ø> (ø)
ddcommon 82.11% <ø> (ø)
ddcommon-ffi 68.11% <ø> (ø)
ddtelemetry 59.02% <ø> (ø)
ipc 84.00% <ø> (ø)
profiling 84.26% <ø> (ø)
profiling-ffi 77.42% <ø> (ø)
serverless 0.00% <ø> (ø)
sidecar 40.23% <ø> (ø)
sidecar-ffi 0.00% <ø> (ø)
spawn-worker 50.18% <ø> (ø)
tinybytes 91.66% <91.66%> (∅)
trace-mini-agent 70.88% <ø> (ø)
trace-normalization 98.25% <ø> (ø)
trace-obfuscation 95.73% <ø> (ø)
trace-protobuf 77.67% <ø> (ø)
trace-utils 93.42% <ø> (+0.41%) ⬆️

tinybytes/src/lib.rs Outdated Show resolved Hide resolved
@bantonsson bantonsson force-pushed the ban/tiny-bytes-implementation branch from 2670283 to b63856b Compare August 20, 2024 15:03
}

impl hash::Hash for Bytes {
// TODO should we cache the hash since we know the bytes are immutable?
Copy link
Contributor

Choose a reason for hiding this comment

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

I suppose we can do that. I suppose the overhead in size is minimal a couple bytes, which are likely anyway within padding (the struct is 32 bytes, and system allocator will give you 16 byte aligned memory...)

@bantonsson bantonsson force-pushed the ban/tiny-bytes-implementation branch 2 times, most recently from 5ed7be7 to 91212ad Compare August 20, 2024 15:30
Copy link
Contributor

@ekump ekump left a comment

Choose a reason for hiding this comment

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

A couple non-blocking comments but LGTM!

tinybytes/Cargo.toml Outdated Show resolved Hide resolved
tinybytes/Cargo.toml Show resolved Hide resolved
tinybytes/src/lib.rs Show resolved Hide resolved
tinybytes/src/lib.rs Show resolved Hide resolved
tinybytes/src/lib.rs Show resolved Hide resolved
@bantonsson bantonsson force-pushed the ban/tiny-bytes-implementation branch 2 times, most recently from e97ee36 to bb014cd Compare August 22, 2024 15:21
@bantonsson bantonsson force-pushed the ban/tiny-bytes-implementation branch from bb014cd to 80b0502 Compare August 26, 2024 11:47
@bantonsson bantonsson merged commit 68b5d0a into main Aug 26, 2024
34 checks passed
@bantonsson bantonsson deleted the ban/tiny-bytes-implementation branch August 26, 2024 12:22
@bantonsson
Copy link
Contributor Author

This is the PR for the proptest dependency changes that avoids affecting the benchmarks proptest-rs/proptest#499

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants