- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for BenchmarkConcurrent (0.26 sec)
-
src/math/rand/rand_test.go
} } func BenchmarkRead1000(b *testing.B) { r := New(NewSource(1)) buf := make([]byte, 1000) b.ResetTimer() for n := b.N; n > 0; n-- { r.Read(buf) } } func BenchmarkConcurrent(b *testing.B) { const goroutines = 4 var wg sync.WaitGroup wg.Add(goroutines) for i := 0; i < goroutines; i++ { go func() { defer wg.Done() for n := b.N; n > 0; n-- { Int63()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 18:42:28 UTC 2024 - 16.9K bytes - Viewed (0) -
src/math/rand/v2/rand_test.go
r := testRand() for n := b.N; n > 0; n-- { r.Shuffle(30, func(i, j int) { if i < 0 || i >= 30 || j < 0 || j >= 30 { b.Fatalf("bad swap(%d, %d)", i, j) } }) } } func BenchmarkConcurrent(b *testing.B) { const goroutines = 4 var wg sync.WaitGroup wg.Add(goroutines) for i := 0; i < goroutines; i++ { go func() { defer wg.Done() for n := b.N; n > 0; n-- { Int64()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 18:42:28 UTC 2024 - 17.4K bytes - Viewed (0)