Eric Roshan Eisner avatar Eric Roshan Eisner committed 0277095 Draft

ignore unused part of buffer

benchmark old ns/op new ns/op delta
BenchmarkHash8Bytes 2143 2056 -4.06%
BenchmarkHash1K 12299 12208 -0.74%
BenchmarkHash8K 89690 89741 +0.06%

benchmark old MB/s new MB/s speedup
BenchmarkHash8Bytes 3.73 3.89 1.04x
BenchmarkHash1K 83.25 83.87 1.01x
BenchmarkHash8K 91.34 91.28 1.00x

Comments (0)

Files changed (1)

 		panic("sha3: close after close")
 	}
 	d.buf[d.n] = 0x01
-	for i := d.n + 1; i < len(d.buf); i++ {
+	for i := d.n + 1; i < d.blocksize; i++ {
 		d.buf[i] = 0
 	}
 	d.buf[d.blocksize-1] |= 0x80
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.