]> Cypherpunks.ru repositories - gostls13.git/commit
unicode/utf16: speed up and clean up Decode
authorAlberto Donizetti <alb.donizetti@gmail.com>
Tue, 23 Feb 2016 17:45:38 +0000 (18:45 +0100)
committerRob Pike <r@golang.org>
Tue, 23 Feb 2016 21:09:07 +0000 (21:09 +0000)
commit7786f9790561ceda98e9883256ed50d26fa136d6
tree50a1e727081b8f788c6c7d3269d7c4d2ec397568
parent9877900c8c9c21704c0052c65e39216c6f400706
unicode/utf16: speed up and clean up Decode

name                        old time/op  new time/op  delta
DecodeValidASCII-4          94.7ns ± 1%  87.4ns ± 1%  -7.71%  (p=0.000 n=10+9)
DecodeValidJapaneseChars-4  91.0ns ± 2%  84.8ns ± 0%  -6.77%  (p=0.000 n=9+10)
DecodeRune-4                16.5ns ± 0%  16.6ns ± 2%    ~     (p=0.108 n=9+10)

For #6957

Change-Id: I618c15c2a42ef7ec6a5cd163b7c3f1a65ca4ad01
Reviewed-on: https://go-review.googlesource.com/19826
Reviewed-by: Rob Pike <r@golang.org>
src/unicode/utf16/utf16.go