]> Cypherpunks.ru repositories - gostls13.git/commit
unicode/utf16: speed up and clean up Encode and EncodeRune
authorAlberto Donizetti <alb.donizetti@gmail.com>
Tue, 23 Feb 2016 21:54:38 +0000 (22:54 +0100)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 24 Feb 2016 21:07:03 +0000 (21:07 +0000)
commita9581e2e7abfa0dd7033ee75ef6a64ce0a89bee2
tree04ae9ea628cd5f7ed06709ce594fa754935dd495
parent47b04228858e9a4a767acd12a029e59d582f3ba1
unicode/utf16: speed up and clean up Encode and EncodeRune

name                        old time/op  new time/op  delta
EncodeValidASCII-4          74.1ns ± 1%  70.1ns ± 1%   -5.46%  (p=0.000 n=10+10)
EncodeValidJapaneseChars-4  61.3ns ± 0%  58.9ns ± 0%   -3.82%  (p=0.000 n=10+10)
EncodeRune-4                13.1ns ± 1%   9.8ns ± 0%  -25.24%   (p=0.000 n=10+9)

Fixes #6957

Change-Id: I9dde6d77420c34c6e2ef3e6213bb6be9b58a3074
Reviewed-on: https://go-review.googlesource.com/19891
Reviewed-by: Rob Pike <r@golang.org>
Run-TryBot: Rob Pike <r@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/unicode/utf16/utf16.go