aboutsummaryrefslogtreecommitdiff
path: root/test/codegen/mathbits.go
diff options
context:
space:
mode:
authorErikPelli <erikpellizzon1@gmail.com>2022-08-14 07:46:22 +0000
committerGopher Robot <gobot@golang.org>2022-08-17 03:15:44 +0000
commite1b62efaf33988a5153510898d37309cee78f26e (patch)
tree5fad1a4faaaa21f907c283f4359c8241c8bb6265 /test/codegen/mathbits.go
parent0d8efa6e842169e61cbe343441092b6f7c9b886c (diff)
downloadgo-e1b62efaf33988a5153510898d37309cee78f26e.tar.xz
encoding/base64: optimize decodemap memory set
The existing implementation has an execution time higher in the benchmark than this one. This is an optimized implementation using the copy() function and a constant 256 bytes string with the values to be copied. ``` name old time/op new time/op delta NewEncoding-4 329ns ± 1% 231ns ± 1% -29.72% (p=0.008 n=5+5) name old speed new speed delta NewEncoding-4 778MB/s ± 1% 1108MB/s ± 1% +42.29% (p=0.008 n=5+5) ``` Fixes #53211 Change-Id: I80fe62aa40623125ef81ae9164a8405eed30b71b GitHub-Last-Rev: 55dce6f636ad29a70daa935169710c22f44ab31f GitHub-Pull-Request: golang/go#53212 Reviewed-on: https://go-review.googlesource.com/c/go/+/410194 Reviewed-by: Keith Randall <khr@google.com> Run-TryBot: Keith Randall <khr@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org> Auto-Submit: Keith Randall <khr@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
Diffstat (limited to 'test/codegen/mathbits.go')
0 files changed, 0 insertions, 0 deletions