Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var LargeFFTSize = 1 << 20
Fast Fourier Transform Benchmark LargeFFTSize sets the default data length for the FftBenchmark when running from the command line.
var LargeMatrixMultiplicationSize = 512 * 4
Matrix Multiplication Benchmark LargeMatrixMultiplicationSize controls the default workload for the MatrixMultiplicationBenchmark when used from the command line. Tests should supply a smaller value.
var LargeMemoryCopySize = 25 * 1_000_000_000
Memory Copy and Set Operations Benchmark LargeMemoryCopySize specifies the byte count used by MemoryCopySetBenchmark when run from the command line.
var LargePlaintextSize = 256 * 10_000_000
Cryptographic Algorithm Benchmark (AES Encryption/Decryption) LargePlaintextSize configures the workload for CryptoBenchmark when executed from the command line.
var LargeSortSize = 1_000_000_000
Sorting Benchmark LargeSortSize indicates the number of elements used when running the sorting benchmark from the command line.
var LargeStreamSize = 1_000_000_000
LargeStreamSize defines the default array length used by the StreamBenchmark when executed from the command line.
Functions ¶
func CryptoBenchmark ¶
func CryptoBenchmark(size int)
CryptoBenchmark encrypts and decrypts a byte slice of the provided length. A default of one million bytes is used if size <= 0.
func FftBenchmark ¶
func FftBenchmark(size int)
FftBenchmark runs a Fast Fourier Transform over a slice of the provided size. If size <= 0 a small power-of-two length is chosen.
func MatrixMultiplicationBenchmark ¶
func MatrixMultiplicationBenchmark(size int)
MatrixMultiplicationBenchmark performs a simple matrix multiplication using the provided matrix dimension. If size is <= 0 a small default is used.
func MemoryCopySetBenchmark ¶
func MemoryCopySetBenchmark(size int)
MemoryCopySetBenchmark exercises memory copy and set operations on a slice of the given size. If size <= 0 a default of one million bytes is used.
func SortingBenchmark ¶
func SortingBenchmark(size int)
SortingBenchmark sorts a slice with the given length. If size <= 0 a default of one million elements is used.
func StreamBenchmark ¶
func StreamBenchmark(size int)
StreamBenchmark performs a memory bandwidth test using the provided size. If size <= 0 a modest default of one million elements is used.
Types ¶
This section is empty.