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

Updates for go1.21 rand changes #28

Merged
merged 4 commits into from
Aug 13, 2023
Merged

Updates for go1.21 rand changes #28

merged 4 commits into from
Aug 13, 2023

Commits on Aug 7, 2023

  1. bench: separate benchmarks for Pick and PickSource

    As discussed in #26, the changes in go1.21 will remove rand contention
    when the (now deprecated) rand.Seed() is not called.
    
    In order to check if this brings performance parity, start to benchmark
    both Pick and PickSource functions in parallel, and no longer rand.Seed
    in test init.
    mroth committed Aug 7, 2023
    Configuration menu
    Copy the full SHA
    0ee7b80 View commit details
    Browse the repository at this point in the history

Commits on Aug 12, 2023

  1. Configuration menu
    Copy the full SHA
    c2e6731 View commit details
    Browse the repository at this point in the history

Commits on Aug 13, 2023

  1. docs: update examples/compbench for go1.21

    results on my Apple M2 Pro laptop:
    
    $ make analysis
    benchstat -filter=".name:Multiple" -col="/lib" -row="/size" -table="/concurrency" results.txt
    /concurrency: single
            │    randutil     │             weightedrand             │
            │     sec/op      │   sec/op     vs base                 │
    1e1          455.70n ± 0%   19.16n ± 2%   -95.80% (p=0.000 n=10)
    1e2          438.20n ± 0%   32.81n ± 0%   -92.51% (p=0.000 n=10)
    1e3         1179.00n ± 0%   46.00n ± 0%   -96.10% (p=0.000 n=10)
    1e4         6591.00n ± 1%   60.34n ± 0%   -99.08% (p=0.000 n=10)
    1e5        61188.00n ± 0%   84.83n ± 0%   -99.86% (p=0.000 n=10)
    1e6        631928.5n ± 1%   112.6n ± 2%   -99.98% (p=0.000 n=10)
    1e7       6402254.0n ± 1%   240.7n ± 0%  -100.00% (p=0.000 n=10)
    geomean       16.84µ        63.16n        -99.62%
    
    /concurrency: parallel
            │     randutil     │             weightedrand             │
            │      sec/op      │   sec/op     vs base                 │
    1e1          589.300n ± 0%   2.026n ± 1%   -99.66% (p=0.000 n=10)
    1e2          490.000n ± 0%   3.337n ± 1%   -99.32% (p=0.000 n=10)
    1e3          766.500n ± 0%   4.518n ± 1%   -99.41% (p=0.000 n=10)
    1e4          808.700n ± 0%   5.951n ± 2%   -99.26% (p=0.000 n=10)
    1e5         6438.500n ± 1%   8.184n ± 1%   -99.87% (p=0.000 n=10)
    1e6        108285.50n ± 1%   12.00n ± 1%   -99.99% (p=0.000 n=10)
    1e7       2011263.00n ± 2%   28.95n ± 1%  -100.00% (p=0.000 n=10)
    geomean        5.907µ        6.548n        -99.89%
    mroth committed Aug 13, 2023
    Configuration menu
    Copy the full SHA
    60f6145 View commit details
    Browse the repository at this point in the history
  2. port benchstat format from examples/compbench

    key-value format is nicer for later filtering in benchstat
    mroth committed Aug 13, 2023
    Configuration menu
    Copy the full SHA
    b306b18 View commit details
    Browse the repository at this point in the history