perf(number): skip the rebuild for tokens without underscores
Assisted-by: GLM 5.3
This commit is contained in:
@@ -47,6 +47,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
the input is validated UTF-8 up front, so the conversion pass and its four
|
||||
bytes per rune were pure overhead. Parsing a large array-of-tables document
|
||||
runs about a fifth faster and allocates about half the memory.
|
||||
- Numeric tokens without underscores skip the normalising rebuild: digits are
|
||||
validated in place in `joinDigits`, and a float whose token is already
|
||||
clean goes to `strconv.ParseFloat` directly. One allocation per integer
|
||||
atom and two per float atom disappear.
|
||||
|
||||
### Fixed
|
||||
|
||||
|
||||
Reference in New Issue
Block a user