-
Notifications
You must be signed in to change notification settings - Fork 39
/
CHANGELOG
337 lines (221 loc) · 15.2 KB
/
CHANGELOG
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
# Changelog
Notes significant changes to `lexical` and `lexical-core`. The version specified is for `lexical-core`.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
### Added
- Additional trait impls for `f16` and `bf16` to better match Rust's interface.
## [1.0.5] 2024-12-08
### Fixed
- Only require 19 digits for writing `i64` and not 20 (#191).
## [1.0.4] 2024-12-07
### Changed
- Improved performance of integer and float formatting using the [jeaiii](https://jk-jeon.github.io/posts/2022/02/jeaiii-algorithm/) algorithm with additional optimizations to minimize branching (#163). This also improves memory safety guarantees, since no unsafe indexing is used when formatting integers.
- Updated our build timings, binary sizes, and benchmarks.
## [1.0.3] 2024-12-06
### Changed
- Improved performance of number formatting with non-decimal radices (#169).
### Fixed
- Inaccurate number formatting with non-decimal radices (#169).
## [1.0.2] 2024-09-24
### Changed
- Higher performance when parsing floats with digit separators.
### Fixed
- Inlining inconsistency between public API methods (credit to @zheland)
- Incorrectly accepting leading zeros when `no_integer_leading_zeros` was enabled.
- Have consistent errors when an invalid leading digit is found for floating point numbers to always be `Error::InvalidDigit`.
- Incorrect parsing of consecutive digit separators.
- Inaccuracies when parsing digit separators at various positions leading to incorect errors being returned.
- Selecting only a subset of parse and/or write features would cause compilation errors.
- Fixed bug with writing integers with custom radices.
## [1.0.1] 2024-09-16
### Fixed
- A correctness regression.
- Regressions where parsing digit separators without the `compact` panicked.
## [1.0.0] 2024-09-14
### Added
- Added fuzzing and miri code safety analysis to our CI pipelines.
- Removed requirement of `alloc` in `no_std` ennvironments without the `write` feature.
- Make multi-digit optimizations in integer parsing optional.
- Much higher miri coverage including for proptests and our corner cases from the golang test suite.
### Changed
- Updated the MSRV to 1.63.0 (1.65.0 for development).
- Improved performance due to compiler regressions in rustc 1.81.0 and above.
### Fixed
- Removed use of undefined behavior in `MaybeUninit`.
- Provide better safety documentation.
- Parsing of Ruby float literals.
- Performance regressions in Rust 1.81.0+.
- Removed incorrect bounds checking in reading from iterators.
- Overflow checking with integer parsing.
- Writing `-0.0` with a leading `-`.
- Reduced binary siezes when the compact feature was enabled.
- Improved performance of integer and float parsing, particularly with small integers.
- Removed almost all unsafety in `lexical-util` and clearly documented the preconditions to use safely.
- Removed almost all unsafety in `lexical-write-integer` and clearly documented the preconditions to use safely.
- Writing special numbers even with invalid float formats is now always memory safe.
### Removed
- Support for mips (MIPS), mipsel (MIPS LE), mips64 (MIPS64 BE), and mips64el (MIPS64 LE) on Linux.
- All `_unchecked` API methods, since the performance benefits are dubious and it makes safety invariant checking much harder.
- The `safe` and `nightly` features, since ASM is now supported by the MSRV on stable and opt-in for memory-safe indexing is no longer relevant.
## [0.8.5] 2022-06-06
### Changed
- Fixed the partial integer parser to correctly return negative values if parsing partial input.
## [0.8.5] 2022-05-18
### Changed
- Fixed numeric overflow bug causing panic (should explicitly wrap) in dragonbox algorithm's `umul192_lower128`.
## [0.8.4] 2022-03-15
- Updated the dragonbox algorithm to implement the new changes to decrease code size.
## [0.8.3] 2022-03-10
### Added
- Added support for `-Zmiri-tag-raw-pointers` in miri correctness checks.
- Added the documented functions `format_error` and `format_is_valid` to determine if a format packed struct is valid, since the previous checks relied on undocumented behavior.
- Added `from_radix` to `ParseFloatOptions` and `WriteFloatOptions`, to simplify creating the default options with a different radix.
### Changed
- Fixed `no_std` in `lexical-parse-float` when default features are disabled.
- Fixed issue in parsing integers and floats with the `power-of-two` feature enabled for radixes 16 and 32.
## [0.8.2] 2021-10-04
### Changed
- Reproduce all dependent licenses in lexical, and document extensively what features are dependent on what licensing terms.
## [0.8.1] 2021-09-03
### Changed
- Fixed a bug in feature `format` where `skip::Bytes::count` was not being incremented in `step_by_unchecked`.
## [0.8.0] 2021-09-03
This is a very large release that involved a full re-write from the ground-up.
### Added
- Added the Options API
- ParseFloatOptions
- ParseIntegerOptions
- WriteFloatOptions
- WriteIntegerOptions
- Added `parse_with_options`, `parse_partial_with_options`
- Added `write_with_options`.
- Added a faster float writer and parser for power of 2 radixes.
- Added the `required_exponent_notation` flag to `NumberFormat`.
- Added the `power-of-two` feature, for conversion to and from strings with power-of-two bases.
- Added the `compact` feature, optimized for binary size rather than performance.
- Added extensive documentation on benchmarks, algorithms used, and internal implementation details.
### Changed
- Made the Eisel-Lemire algorithm the default float-parser, leading to substantial improvements in performance.
- Made Dragonbox the default float writer.
- Removed pre-computed float tables of powers-of-two, and recreated stable powers of 2 through bit manipulations.
- Refactored all numeric conversions into separate crates, using workspaces.
- Improved the algorithms to write and parse 128-bit integers, using faster division and multiplication algorithms.
- Updated the MSRV to 1.51.0.
- Updated the benchmarks to note the significant algorithm changes.
- Added automatic formatting via Rustfmt, linting via Clippy, as well as increased documentation of safety guarantees.
- Re-wrote NumberFormat to allow more extensive configuration and use const generics.
- Added support for base prefixes and suffixes.
- Reduced static storage required for extended-float algorithms.
- Fixed a bug with trailing digit separators in special values.
- Updated the fuzz handlers and conformance tests.
- Simplified the big-integer arithmetic, improving performance and simplifying maintenance for float parsing algorithms.
### Removed
- Remove the `write_format`, `write_radix`, and similar functions.
- Remove the `parse_format`, `parse_radix`, and similar functions.
- Removed the `dtoa` feature.
- Removed the `rounding` feature.
- Removed the lexical-capi. Existing, high-performance C/C++ libraries exist, so it's no longer practical.
## [0.7.6] 2021-04-21
### Changed
- Updated cfg_if version.
- Downgraded rand to fix proptests.
- Fixed a bug on newer Rustc versions where `slice::sort` is not present in `no_std`.
- Added a feature `libm` which enables stable `no_std` use.
- Patched an implementation of insert_many due to a security advisory which does not affect lexical.
## [0.7.5] 2021-02-21
### Changed
- Fixed issue with `integer::BITS` conflicting with new compilers.
## [0.7.4] 2020-01-27
### Changed
- Changed NumberFormat to use 64-bit flags.
- Added `NO_INTEGER_LEADING_ZEROS` and `NO_FLOAT_LEADING_ZEROS` NumberFormat flags.
- Added `InvalidLeadingZeros` to ErrorCode enum.
- Added `validate_no_leading_zeros` to reject invalid inputs.
- Added new leading zero checks to all pre-defined NumberFormat constants.
## [0.7.3] 2020-01-26
### Changed
- Updated the format bitflags to make matches more efficient, allowing jumptables to be used for most situations.
## [0.7.2] 2020-01-25
### Changed
- Fixed a regression in parsing special values.
## [0.7.1] 2020-01-23
### Added
- Added `format` feature to control parsing integers and floats from number specifications.
- Added the `NumberFormat` bitflags to control Number format specifications. These flags control how a number is parsed, including enabling the use of digit separators, requiring integer or fraction digits, and more.
- Added pre-defined constants for `NumberFormat` (`RUST_STRING`, `PYTHON_LITERAL`) to avoid compiling formats when not needed.
- Added the `FromLexicalFormat` and `FromLexicalLossyFormat` traits with the `format` feature, which enable you to specify the number format during parsing.
- Implemented algorithms in terms of generic iterators, to allow skipping digit separators.
- Implemented data interfaces to simplify parsing and validating number format.
- Added more values to `ErrorCode` to signify more parse failures.
### Changed
- Changed `ErrorCode::MissingFraction` to be `ErrorCode::MissingMantissa`, to differentiate between missing integers, missing fractions, and missing significant digits (mantissa).
- Remove `RawFloatState` and `FloatState` and replaced it logically with `FastDataInterface` and `SlowDataInterface`, allowing format-defined parsing.
## [0.7.0] - 2020-01-07
### Changed
- Updated `arrayvec` and `static-assertions` versions.
- Removed support for Rustc versions below 1.37.0.
## [0.6.3] - 2019-10-08
### Changed
- Forced version `0.1.9` for cfg-if to support older Rustc versions.
- Documented dependency versioning and upgrade procedure.
## [0.6.2] - 2019-09-22
### Changed
- Fixed a bug causing compilation issues on MSVC.
## [0.6.1] - 2019-09-16
### Changed
- Removed panic handler, allowing use in `no_std` environments.
## [0.6.0] - 2019-09-08
### Added
- Added `get/set_exponent_default_char`, `get/set_exponent_backup_char`, and `get/set_float_rounding`, to allow validation logic for config variables.
- Added the `write*` functions, which replace the `*toa` methods.
- Added `parse*` functions, which replace the `ato*` methods.
- Added tests to ensure lexical-core works with proc-macros.
- Substituted rust-stackvector with arrayvec, which has better support.
### Removed
- Removed `EXPONENT_DEFAULT_CHAR`, `EXPONENT_BACKUP_CHAR`, and `FLOAT_ROUNDING`.
- Removed all expanded API signatures for `ato*` to `*toa`, since these were for compatibility with the C-API and were therefore redundant.
- Removed the FFI submodule, and moved all functionality to the `lexical-capi` crate.
## [0.5.0] - 2019-08-20
### Added
- Added ffi::Result, an FFI-compatible tagged union, to store results for FFI-compatible functions.
- Added `MAX_*_SIZE_BASE10` constants, to determine the maximum size in bytes a formatted type will take in base 10.
- Added `ato*_partial` functions, which parse until an invalid digit is found, returning the value and number of processed digits.
- Added unittests for itoa designed to test uniform, sequential, and heterogeneous data, aimed to test both optimal performance and branch prediction misses.
### Changed
- Improved code generation and reduced binary bloat. There are a few algorithmic differences that make this possible, but the parsers now generally extract the float subcomponents first, then parsed known-good data after for enhanced performance.
- Updated the benchmarks and benchmark results.
- Moved lexical::Error to lexical_core::Error. Error is re-exported in lexical.
- Add variants for lexical_core::ErrorCode. Added `Underflow`, to detect numerical underflow, `EmptyFraction`, to detect floats with an empty integer and fraction components, and `EmptyExponent`, to detect floats with no value following the exponent character.
- Changed Result to use `std::result::Result`.
- Fixed proptests and added more comprehensive proptests thanks to @dangrabcad.
- Moved FFI-compatible code to the public `ffi` module.
- Removed `*_slice` from functions in the public API, since there is no naming conflict with FFI code.
- Removed `*_ffi` and `*_FFI` from public functions and constants.
- Optimized the itoa exporters using specialized optimizations for the type size and number of digits. The resulting performance excels for all values, providing 2-3x performance improvements, with exceptional performance for values with a small number of digits.
- Optimized integer division algorithm based off the compiler-builtins crate to avoid redundant calls to an expensive compiler intrinsic (`__udivmodti4`).
- Optimized the atoi algorithm for 128-bit integers by using intermediary 64-bit integers, leading to performance boosts of up to 30x.
### Removed
- Removed the unchecked parsers from the public API. `try_parse*` has been replaced with `parse*`.
- Removed ErrorCode::Success, since with the new result types it was redundant.
## [0.4.3] - 2019-06-26
- Fixed a bug (issue #20) leading to incorrect float parsing (1 ULP error) for slow-path algorithms containing floats with a trailing 0-digit in the fraction component (discovery by @dangrabcad). Added in comprehensive unittests to avoid future regressions.
- Fixed CI for older Rustc versions due to issues with the `edition` keyword.
- Updated dependencies (credit to @junhoo).
- Updated the benchmarks for float and integer formatting to use `Write::write_fmt` rather than `to_string` to avoid heap allocation leading to misleading results (credit to @RazrFalcon).
## [0.4.2] - 2019-06-24
### Added
- Comprehensive continuous integration unittests for numerous platforms, based off the [trust](https://github.com/japaric/trust) templates.
- Added known issue for a non-default, lossy setting on armv6 architectures.
### Changed
- Bug fix for 32-bit targets.
## [0.4.1] - 2019-06-20
### Added
- Backwards compatible support for Rustc 1.24.0.
- Added `parse_partial*` parsers, which parse until an invalid digit is found, returning the value and number of processed digits.
### Changed
- Worked around a bug in the internal float formatter where `&arr[idx]` creates a local copy in Rust versions before 1.28.0, creating a dangling reference after the scope ends. For more details, see `cached_grisu_power` in `/lexical-core/src/ftoa/grisu2.rs` .
- Changed public trait names for `FromBytes`, `FromBytesLossy`, and `ToBytes` to `FromLexical`, `FromLexicalLossy`, and `ToLexical`.
- Changed method names for trait `ToLexical` from `to_bytes` and `to_bytes_radix` to `to_lexical` and `to_lexical_radix` to avoid conflict with unstable feature [int_to_from_bytes](https://doc.rust-lang.org/1.27.2/unstable-book/library-features/int-to-from-bytes.html#int_to_from_bytes).
- Changed method names for trait `FromLexical` from `from_bytes`, `from_bytes_radix`, `try_from_bytes`, and `try_from_bytes_radix` to `from_lexical`, `from_lexical_radix`, `try_from_lexical`, and `try_from_lexical_radix` to avoid conflict with unstable feature [int_to_from_bytes](https://doc.rust-lang.org/1.27.2/unstable-book/library-features/int-to-from-bytes.html#int_to_from_bytes).
- Changed method names for trait `FromLexicalLossy` from `from_bytes_lossy`, `from_bytes_lossy_radix`, `try_from_bytes_lossy`, and `try_from_bytes_lossy_radix` to `from_lexical_lossy`, `from_lexical_lossy_radix`, `try_from_lexical_lossy`, and `try_from_lexical_lossy_radix` to avoid conflict with unstable feature [int_to_from_bytes](https://doc.rust-lang.org/1.27.2/unstable-book/library-features/int-to-from-bytes.html#int_to_from_bytes).