From b370325ccf8a15d3b58418d85fd22e32e2aeb2fc Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Wed, 8 Mar 2023 17:04:07 +0100 Subject: speed: GoGCM: start at block size 16 BenchmarkGoGCMBlockSize/16-4 5499200 219.7 ns/op 72.83 MB/s BenchmarkGoGCMBlockSize/32-4 4497284 266.2 ns/op 120.22 MB/s BenchmarkGoGCMBlockSize/64-4 3296336 363.4 ns/op 176.10 MB/s BenchmarkGoGCMBlockSize/128-4 4204794 285.5 ns/op 448.36 MB/s BenchmarkGoGCMBlockSize/256-4 2928472 409.7 ns/op 624.83 MB/s BenchmarkGoGCMBlockSize/512-4 1825164 658.0 ns/op 778.09 MB/s BenchmarkGoGCMBlockSize/1024-4 1000000 1151 ns/op 889.98 MB/s BenchmarkGoGCMBlockSize/2048-4 560275 2135 ns/op 959.47 MB/s BenchmarkGoGCMBlockSize/4096-4 291906 4099 ns/op 999.28 MB/s BenchmarkGoGCMBlockSize/8192-4 148916 8033 ns/op 1019.83 MB/s BenchmarkGoGCMBlockSize/16384-4 75337 15911 ns/op 1029.75 MB/s BenchmarkGoGCMBlockSize/32768-4 37912 31651 ns/op 1035.30 MB/s BenchmarkGoGCMBlockSize/65536-4 19000 64287 ns/op 1019.43 MB/s BenchmarkGoGCMBlockSize/131072-4 9225 127636 ns/op 1026.92 MB/s BenchmarkGoGCMBlockSize/262144-4 4752 252300 ns/op 1039.02 MB/s BenchmarkGoGCMBlockSize/524288-4 2377 504612 ns/op 1038.99 MB/s BenchmarkGoGCMBlockSize/1048576-4 1183 1011637 ns/op 1036.51 MB/s --- internal/speed/speed_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'internal') diff --git a/internal/speed/speed_test.go b/internal/speed/speed_test.go index 39ef918..0d05081 100644 --- a/internal/speed/speed_test.go +++ b/internal/speed/speed_test.go @@ -40,7 +40,7 @@ func BenchmarkGoGCM(b *testing.B) { } func BenchmarkGoGCMBlockSize(b *testing.B) { - for blockSize := 1024; blockSize <= 1024*1024; blockSize *= 2 { + for blockSize := 16; blockSize <= 1024*1024; blockSize *= 2 { name := fmt.Sprintf("%d", blockSize) b.Run(name, func(b *testing.B) { bGoGCMBlockSize(b, blockSize) }) } -- cgit v1.2.3