MCPcopy Index your code

hub / github.com/awnumar/fastrand / functions

Functions50 in github.com/awnumar/fastrand

↓ 13 callersMethodRead
Read fills b with random data. It always returns len(b), nil.
fastrand.go:50
↓ 11 callersFunctionRead
Read is a helper function that calls Reader.Read on b. It always fills b completely.
fastrand.go:117
↓ 9 callersFunctionIntn
Intn returns a uniform random int in [0,n). It panics if n <= 0.
fastrand.go:147
↓ 8 callersFunctionpanics
panics returns true if the function fn panicked.
fastrand_test.go:17
↓ 6 callersFunctionBigIntn
BigIntn returns a uniform random *big.Int in [0,n). It panics if n <= 0.
fastrand.go:158
↓ 6 callersFunctionUint64n
Uint64n returns a uniform random uint64 in [0,n). It panics if n == 0.
fastrand.go:127
↓ 4 callersFunctionPerm
Perm returns a random permutation of the integers [0,n).
fastrand.go:164
↓ 3 callersFunctionShuffle
Shuffle randomizes the order of elements. n is the number of elements. It panics if n < 0. swap swaps the elements with indexes i and j.
fastrand.go:176
↓ 2 callersFunctionBytes
Bytes is a helper function that returns n bytes of random data.
fastrand.go:120
FunctionBenchmarkBigCryptoInt
BenchmarkBigCryptoInt benchmarks the (crypto/rand).Int function for small ints.
fastrand_test.go:333
FunctionBenchmarkBigCryptoIntLarge
BenchmarkBigCryptoIntLarge benchmarks the (crypto/rand).Int function for large ints.
fastrand_test.go:341
FunctionBenchmarkBigIntn
BenchmarkBigIntn benchmarks the BigIntn function for small ints.
fastrand_test.go:315
FunctionBenchmarkBigIntnLarge
BenchmarkBigIntnLarge benchmarks the BigIntn function for large ints.
fastrand_test.go:323
FunctionBenchmarkIntn
BenchmarkIntn benchmarks the Intn function for small ints.
fastrand_test.go:298
FunctionBenchmarkIntnLarge
BenchmarkIntnLarge benchmarks the Intn function for large ints.
fastrand_test.go:306
FunctionBenchmarkPerm32
BenchmarkPerm benchmarks the speed of Perm for small slices.
fastrand_test.go:351
FunctionBenchmarkPermLarge4k
BenchmarkPermLarge benchmarks the speed of Perm for large slices.
fastrand_test.go:359
FunctionBenchmarkRead32
BenchmarkRead benchmarks the speed of Read for small slices.
fastrand_test.go:385
FunctionBenchmarkRead4Threads32
BenchmarkRead4Threads32 benchmarks the speed of Read when it's being using across four threads.
fastrand_test.go:406
FunctionBenchmarkRead4Threads512kb
BenchmarkRead4Threads512kb benchmarks the speed of Read when it's being using across four threads with 512kb read sizes.
fastrand_test.go:432
FunctionBenchmarkRead512kb
BenchmarkRead512kb benchmarks the speed of Read for larger slices.
fastrand_test.go:395
FunctionBenchmarkRead64Threads32
BenchmarkRead64Threads32 benchmarks the speed of Read when it's being using across 64 threads.
fastrand_test.go:458
FunctionBenchmarkRead64Threads512kb
BenchmarkRead64Threads512kb benchmarks the speed of Read when it's being using across 64 threads with 512kb read sizes.
fastrand_test.go:484
FunctionBenchmarkReadCrypto32
BenchmarkReadCrypto benchmarks the speed of (crypto/rand).Read for small slices. This establishes a lower limit for BenchmarkRead32.
fastrand_test.go:510
FunctionBenchmarkReadCrypto4Threads32
BenchmarkReadCrypto4Threads32 benchmarks the speed of rand.Read when its being used across 4 threads with 32 byte read sizes.
fastrand_test.go:532
FunctionBenchmarkReadCrypto4Threads512kb
BenchmarkReadCrypto4Threads512kb benchmarks the speed of rand.Read when its being used across 4 threads with 512 kb read sizes.
fastrand_test.go:561
FunctionBenchmarkReadCrypto512kb
BenchmarkReadCrypto512kb benchmarks the speed of (crypto/rand).Read for larger slices. This establishes a lower limit for BenchmarkRead512kb.
fastrand_test.go:521
FunctionBenchmarkReadCrypto64Threads32
BenchmarkReadCrypto64Threads32 benchmarks the speed of rand.Read when its being used across 4 threads with 32 byte read sizes.
fastrand_test.go:590
FunctionBenchmarkReadCrypto64Threads512kb
BenchmarkReadCrypto64Threads512k benchmarks the speed of rand.Read when its being used across 4 threads with 512 kb read sizes.
fastrand_test.go:619
FunctionBenchmarkReadMath32
BenchmarkReadMath benchmarks the speed of (math/rand).Read for small slices. This establishes an upper limit for BenchmarkRead32.
fastrand_test.go:648
FunctionBenchmarkReadMath4Threads32
BenchmarkReadMath4Threads32 benchmarks the speed of ReadMath when it's being using across four threads.
fastrand_test.go:670
FunctionBenchmarkReadMath4Threads512kb
BenchmarkReadMath4Threads512kb benchmarks the speed of ReadMath when it's being using across four threads with 512kb read sizes.
fastrand_test.go:696
FunctionBenchmarkReadMath512kb
BenchmarkReadMath512kb benchmarks the speed of (math/rand).Read for larger slices. This establishes an upper limit for BenchmarkRead512kb.
fastrand_test.go:659
FunctionBenchmarkReadMath64Threads32
BenchmarkReadMath64Threads32 benchmarks the speed of ReadMath when it's being using across 64 threads.
fastrand_test.go:722
FunctionBenchmarkReadMath64Threads512kb
BenchmarkReadMath64Threads512kb benchmarks the speed of ReadMath when it's being using across 64 threads with 512kb read sizes.
fastrand_test.go:748
FunctionBenchmarkShuffle32
BenchmarkShuffle benchmarks the speed of Shuffle for small slices.
fastrand_test.go:367
FunctionBenchmarkShuffleLarge4k
BenchmarkShuffleLarge benchmarks the speed of Shuffle for large slices.
fastrand_test.go:376
FunctionBenchmarkUint64n
BenchmarkUint64n benchmarks the Uint64n function for small uint64s.
fastrand_test.go:281
FunctionBenchmarkUint64nLarge
BenchmarkUint64nLarge benchmarks the Uint64n function for large uint64s.
fastrand_test.go:289
FunctionTestBigIntnPanics
TestBigIntnPanics tests that BigIntn panics if n <= 0.
fastrand_test.go:57
FunctionTestIntn
TestIntn tests the Intn function.
fastrand_test.go:91
FunctionTestIntnPanics
TestIntnPanics tests that Intn panics if n <= 0.
fastrand_test.go:39
FunctionTestPerm
TestPerm tests the Perm function.
fastrand_test.go:233
FunctionTestRandConcurrent
TestRandConcurrent checks that there are no race conditions when using the rngs concurrently.
fastrand_test.go:185
FunctionTestRead
TestRead tests that Read produces output with sufficiently high entropy.
fastrand_test.go:107
FunctionTestReadConcurrent
TestReadConcurrent tests that concurrent calls to 'Read' will not result result in identical entropy being produced. Note that for this test to work,
fastrand_test.go:131
FunctionTestShuffle
TestShuffle tests the Shuffle function.
fastrand_test.go:258
FunctionTestUint64n
TestUint64n tests the Uint64n function.
fastrand_test.go:75
FunctionTestUint64nPanics
TestUint64nPanics tests that Uint64n panics if n == 0.
fastrand_test.go:26
Functioninit
init provides the initial entropy for the reader that will seed all numbers coming out of fastrand.
fastrand.go:43