diff options
| author | Ruslan Andreev <kels9009@gmail.com> | 2021-06-16 16:25:57 +0000 |
|---|---|---|
| committer | Cherry Mui <cherryyz@google.com> | 2021-10-06 13:47:50 +0000 |
| commit | 810b08b8ec28ea00bce4c008f7c1b48bc9f3e134 (patch) | |
| tree | e06230d828b77c201f7642acca57fd30a98ed3c0 /src/bytes/example_test.go | |
| parent | ce72766a02a4be127a26e95fbd62c4b4bb906e91 (diff) | |
| download | go-810b08b8ec28ea00bce4c008f7c1b48bc9f3e134.tar.xz | |
cmd/compile: inline memequal(x, const, sz) for small sizes
This CL adds late expanded memequal(x, const, sz) inlining for 2, 4, 8
bytes size. This PoC is using the same method as CL 248404.
This optimization fires about 100 times in Go compiler (1675 occurrences
reduced to 1574, so -6%).
Also, added unit-tests to codegen/comparisions.go file.
Updates #37275
Change-Id: Ia52808d573cb706d1da8166c5746ede26f46c5da
Reviewed-on: https://go-review.googlesource.com/c/go/+/328291
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
Trust: David Chase <drchase@google.com>
Diffstat (limited to 'src/bytes/example_test.go')
0 files changed, 0 insertions, 0 deletions
