Descriptionbig: ~8x faster number scanning
- better number scanning algorithm
- fixed a couple of bugs related to base interpretation
- added scan benchmark
- added more test cases and made tests more precise
- introduced Int.scan method matching nat.scan
- refactored Int.Scan; now uses int.scan
- refactored Int.SetString; now uses int.scan
There is more potential, this was a fairly simple change.
gotest -test.bench="ScanPi" before/after (best of 3 runs):
big.BenchmarkScanPi 1000 2024900 ns/op
big.BenchmarkScanPi 10000 257540 ns/op
Patch Set 1 #Patch Set 2 : diff -r aa3072daee08 https://go.googlecode.com/hg/ #Patch Set 3 : diff -r aa3072daee08 https://go.googlecode.com/hg/ #Patch Set 4 : diff -r aa3072daee08 https://go.googlecode.com/hg/ #
Total comments: 4
Patch Set 5 : diff -r 334b588b4e4f https://go.googlecode.com/hg/ #Patch Set 6 : diff -r 334b588b4e4f https://go.googlecode.com/hg/ #
Total comments: 2
Patch Set 7 : diff -r 334b588b4e4f https://go.googlecode.com/hg/ #Patch Set 8 : diff -r 2e0aa4ab6d9f https://go.googlecode.com/hg/ #
MessagesTotal messages: 7
|