1 // Copyright 2017 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
13 func BenchmarkFastrand(b
*testing
.B
) {
14 b
.RunParallel(func(pb
*testing
.PB
) {
21 func BenchmarkFastrandHashiter(b
*testing
.B
) {
22 var m
= make(map[int]int, 10)
23 for i
:= 0; i
< 10; i
++ {
26 b
.RunParallel(func(pb
*testing
.PB
) {
37 func BenchmarkFastrandn(b
*testing
.B
) {
38 for n
:= uint32(2); n
<= 5; n
++ {
39 b
.Run(strconv
.Itoa(int(n
)), func(b
*testing
.B
) {
40 for i
:= 0; i
< b
.N
; i
++ {