mirror of https://github.com/golang/go.git
For very small inputs, h.Reset+h.Write+h.Sum64 is fundamentally slower than a single operation, by about a factor of two, because Write must copy the data into h's buffer, just in case there is another Write before the Sum64. A single function doing the whole sequence knows there is no extra write that will happen, so it doesn't need the buffer, so it avoids the copy. Fixes #42710. Change-Id: Icc79c68ccb10827f6640071d026df86b4940fcc1 Reviewed-on: https://go-review.googlesource.com/c/go/+/392494 Reviewed-by: Ian Lance Taylor <iant@golang.org> Trust: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> |
||
|---|---|---|
| .. | ||
| 42710.txt | ||
| 45628.txt | ||
| 45754.txt | ||
| 46057.txt | ||
| 46059.txt | ||
| 46121.txt | ||
| 46229.txt | ||
| 47005.txt | ||
| 50601.txt | ||
| 51414.txt | ||
| 51868.txt | ||
| regexpdepth.txt | ||