]> Cypherpunks repositories - gostls13.git/commit
math/big: minor performance tuning
authorRobert Griesemer <gri@golang.org>
Thu, 12 Jul 2012 21:12:50 +0000 (14:12 -0700)
committerRobert Griesemer <gri@golang.org>
Thu, 12 Jul 2012 21:12:50 +0000 (14:12 -0700)
commit98ca655919622659598988f7ed420706858ad4c0
treef60e9af8ed61ed339ee1db21ecc8dd41a07ecc37
parent1fa32d21a947dbe00217baa5ff22a27dd54fbb9f
math/big: minor performance tuning

Reuse temporary slice to avoid extra allocations
(originally done correctly by remyoudompheng@gmail.com
in https://golang.org/cl/6345075/).

benchmark           old ns/op    new ns/op    delta
BenchmarkHilbert      6252790      6262304   +0.15%
BenchmarkMul         45827438     45301002   -1.15%

R=r
CC=golang-dev
https://golang.org/cl/6346097
src/pkg/math/big/nat.go
src/pkg/math/big/nat_test.go