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
This commit is contained in:
Jakob Unterwurzacher 2023-03-08 17:04:07 +01:00
parent d74cf7c723
commit b370325ccf
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ func BenchmarkGoGCM(b *testing.B) {
} }
func BenchmarkGoGCMBlockSize(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) name := fmt.Sprintf("%d", blockSize)
b.Run(name, func(b *testing.B) { bGoGCMBlockSize(b, blockSize) }) b.Run(name, func(b *testing.B) { bGoGCMBlockSize(b, blockSize) })
} }