-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
math/rand: shard locks for global locked source
DO NOT REVIEW [needs careful docs, not sure we want to do it] demo for golang#20387 name old time/op new time/op delta Int63Threadsafe 23.4ns ± 5% 35.9ns ± 9% +52.92% (p=0.000 n=10+10) Int63Threadsafe-2 22.2ns ±13% 34.9ns ± 3% +57.08% (p=0.000 n=10+10) Int63Threadsafe-4 20.9ns ±16% 34.9ns ± 2% +67.26% (p=0.000 n=10+10) Int63Threadsafe-8 20.1ns ± 2% 34.9ns ± 1% +74.10% (p=0.000 n=8+8) Int63Threadsafe-16 21.2ns ±18% 34.9ns ± 2% +64.15% (p=0.000 n=10+10) Int63Threadsafe-32 20.9ns ± 2% 34.8ns ± 1% +66.45% (p=0.000 n=9+9) Int63Threadsafe-64 22.1ns ±15% 34.6ns ± 1% +56.38% (p=0.000 n=10+9) Int63ThreadsafeParallel 21.2ns ± 3% 35.2ns ± 1% +65.65% (p=0.000 n=10+8) Int63ThreadsafeParallel-2 28.1ns ± 2% 66.3ns ± 4% +135.54% (p=0.000 n=10+10) Int63ThreadsafeParallel-4 45.9ns ± 1% 43.9ns ± 1% -4.31% (p=0.000 n=9+10) Int63ThreadsafeParallel-8 60.1ns ± 2% 34.1ns ± 4% -43.23% (p=0.000 n=9+10) Int63ThreadsafeParallel-16 70.4ns ± 2% 33.9ns ± 3% -51.75% (p=0.000 n=9+10) Int63ThreadsafeParallel-32 78.3ns ±17% 33.5ns ± 3% -57.18% (p=0.000 n=10+10) Int63ThreadsafeParallel-64 105ns ± 5% 33ns ± 1% -68.63% (p=0.000 n=10+9) Change-Id: I02f036c4c80e41df3065446be36840992b1c978e
- Loading branch information
Showing
2 changed files
with
85 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters