]> Cypherpunks repositories - gostls13.git/commit
strings: speed up Map
authorMartin Möhrmann <moehrmann@google.com>
Mon, 14 Nov 2016 07:05:45 +0000 (08:05 +0100)
committerMartin Möhrmann <moehrmann@google.com>
Fri, 24 Feb 2017 22:53:05 +0000 (22:53 +0000)
commit4b3e6fe123d95f461d8f9febfe782a138ba2387c
tree18a993776f31a77e2e7e019c7fbc08c99ad86090
parent221bc23af6feeab821c49ad11f4661270d310ecd
strings: speed up Map

name                  old time/op  new time/op  delta
ByteByteMap-4         2.03µs ± 2%  1.03µs ± 2%  -49.24%  (p=0.000 n=10+10)
Map/identity/ASCII-4   246ns ± 0%   158ns ± 0%  -35.90%    (p=0.000 n=9+9)
Map/identity/Greek-4   367ns ± 1%   273ns ± 1%  -25.63%  (p=0.000 n=10+10)
Map/change/ASCII-4     582ns ± 1%   324ns ± 1%  -44.34%  (p=0.000 n=10+10)
Map/change/Greek-4     709ns ± 2%   623ns ± 2%  -12.16%  (p=0.000 n=10+10)
MapNoChanges-4         171ns ± 1%   111ns ± 1%  -35.36%   (p=0.000 n=8+10)

Updates #17859

Change-Id: I55d7d261fdc1ce2dcd0ebe23b0fa20b9889bf54c
Reviewed-on: https://go-review.googlesource.com/33201
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/strings/replace_test.go
src/strings/strings.go