commit | 1d31f9b1e05d3766ed2132b5856d364d00c5fdf9 | [log] [tgz] |
---|---|---|
author | Robert Griesemer <gri@golang.org> | Tue Apr 28 16:54:44 2020 -0700 |
committer | Robert Griesemer <gri@golang.org> | Thu Apr 30 03:50:03 2020 +0000 |
tree | ea699c2ff28d20df4db8fd9005ca3f5aeee125e7 | |
parent | b255c123371caf9238dcc732860a907f3ea744da [diff] |
strconv: implement parseFloatPrefix returning no. of bytes consumed parseFloatPrefix will make it easier to implement ParseComplex. Verified that there's no relevant performance impact: Benchmarks run on a "quiet" MacBook Pro, 3.3GHz Dual-Core Intel Core i7, with 16GB 2133MHz LPDDR3 RAM running macOS 10.15.4. name old time/op new time/op delta Atof64Decimal-4 38.2ns ± 4% 38.4ns ± 3% ~ (p=0.802 n=5+5) Atof64Float-4 41.1ns ± 3% 43.0ns ± 1% +4.77% (p=0.008 n=5+5) Atof64FloatExp-4 71.9ns ± 3% 70.1ns ± 1% ~ (p=0.063 n=5+5) Atof64Big-4 124ns ± 5% 119ns ± 0% ~ (p=0.143 n=5+4) Atof64RandomBits-4 57.2ns ± 1% 55.7ns ± 2% -2.66% (p=0.016 n=4+5) Atof64RandomFloats-4 56.8ns ± 1% 56.9ns ± 4% ~ (p=0.556 n=4+5) Atof32Decimal-4 35.4ns ± 5% 35.9ns ± 0% ~ (p=0.127 n=5+5) Atof32Float-4 39.6ns ± 7% 40.3ns ± 1% ~ (p=0.135 n=5+5) Atof32FloatExp-4 73.7ns ± 7% 71.9ns ± 0% ~ (p=0.175 n=5+4) Atof32Random-4 103ns ± 6% 98ns ± 2% -5.03% (p=0.008 n=5+5) Updates #36771. Change-Id: I8ff66b582ae8b468d89c9ffc35c569c735cf0341 Reviewed-on: https://go-review.googlesource.com/c/go/+/230737 Reviewed-by: Ian Lance Taylor <iant@golang.org>
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Gopher image by Renee French, licensed under Creative Commons 3.0 Attributions license.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
Official binary distributions are available at https://golang.org/dl/.
After downloading a binary release, visit https://golang.org/doc/install or load doc/install.html in your web browser for installation instructions.
If a binary distribution is not available for your combination of operating system and architecture, visit https://golang.org/doc/install/source or load doc/install-source.html in your web browser for source installation instructions.
Go is the work of thousands of contributors. We appreciate your help!
To contribute, please read the contribution guidelines: https://golang.org/doc/contribute.html
Note that the Go project uses the issue tracker for bug reports and proposals only. See https://golang.org/wiki/Questions for a list of places to ask questions about the Go language.