Releases: vcschapp/bufjson
v1.1.0
Material non-breaking changes
The API surface area was increased slightly by adding Clone implementations for FixedAnalyzer and Parser.
Thanks to @JeremyMoeglich for this contribution. It opens up interesting use cases because it allows the parser state to be forked without consuming any extra memory (as long as the buffer passed to FixedAnalyzer has a zero-copy clone).
Other changes
- Completed documentation for
lib.rs. - Other documentation clean-up.
v1.0.1
Material non-breaking changes
- Re-export
lexical::Tokeninto the crate root for convenience. - Hide
lexical::NumErrorbehind thenumfeature. This is technically breaking, but only becauselexical::NumErrorslipped through in v1.0.0. BecauseNumErroris only usable with thenumfeature, and this is such a fast follow, it's unlikely anyone can in fact be broken.
Other changes
- Various changes to improve crate documentation and discoverability.
v1.0.0
Material breaking changes
- Introduced a
no_stdfeature. This change was mostly unintrusive, but did result in interfaces changes in thelexical::readpackage:ReadAnalyzernow bounds on a newread::Readtrait instead ofstd::io::Read.ReadAnalyzererror type is now generic:read::Errorbecameread::Error<E>.
Material non-breaking changes
- Explicitly specified a
defaultfeature, withdefault = ["std"]so that the newno_stdfeature is off by default. - Introduced number parsing gated behind the
numandnum_extfeatures. These are partly pure convenience methods, but they also allow no-allocation, no copy number token parsing so they also provide a performance benefit.- On the
lexical::Contenttrait:Content::parse_i64,Content::parse_u64, etc. - As free functions:
lexical::parse_i64,lexical::parse_u64, etc.
- On the
- Introduced zero-allocation comparison with escape sequence expansion.
- On the
lexical::Contenttrait:Content::unescaped_cmp. - As a free function:
lexical::unescaped_cmp.
- On the
- Added a convenience trait,
Sink, to make it easier to extract the full contents of aBufvalue. The signature oflexical::unescapechanges to accept aSink, but it is expected this will be a non-breaking change since there is aSinkimplementation forVec<u8>.
Other changes
- Significantly the
README.md. - Added throughput comparison benchmarks for other JSON-related crates:
simd-json,json-streaming, andstruson. - Added a
COMPARE.mdthat makes it easier to comparebufjsonwith other crates in the JSON ecosystem. - Reduced allocation in
ReadAnalyzer, removing a layer of heap allocation/indirection in theMultiBufcase. No API change, this is purely an internal optimization. - Inline attribute audit. Calibrated
#[inline]and#[inline(always)]across the public API for better cross-crate optimization. - Various minor documentation improvements.
- Various minor housekeeping.
v0.7.4
Material breaking changes
- Removed two members of the
syntax::Expectenumeration as part of commit22dcd97. It turned out they weren't used as distinct entities in the parser's state machine table. (Due to this being an enum that's very unlikely to be directly used at the present time, it was decided to go with a patch version bump fromv0.7.3tov0.7.4despite this technical breaking change.)
Other changes
- Make small optimization to the JSON Pointer evaluator's escape expansion path.
- Make small improvements to the docs.
- Fix bugs in
scripts/verify.shand correctly ensure it runs both the regular tests, including doctests, and the benchmark tests. - Add the benchmark tests and run the actual benchmarks on Git push.
- Fix a broken doctest.
- Increase unit test coverage.
- Remove dead code.
- Add additional metadata to
Cargo.toml.
Full Changelog: v0.7.3...v0.7.4
v0.7.3
v0.7.2
Material non-breaking changes
- Increase
PipeAnalyzerperformance about 20% by giving it its own "native" implementation rather than piggybacking onReadAnalyzer. - Fix bug in
Parser::next_end.
Material breaking changes
None
Other changes
- Fix bug in
ReadAnalyzerwhere aHashassumed chunk invariance. - Add benchmark for
PipeAnalyzer. - Expose
pipemodule in the documentation and include benchmark results.
v0.7.1
Material non-breaking
-
b14087d — New public API:
Parser::next_end()— skips all content within the current structured value (array/object) and returns the closing token. Enables efficient skipping of unneeded subtrees. -
c436702 — ~3% performance improvement to
FixedAnalyzerby simplifying the hot path (replacing match/jump table with direct assignment, shrinkingStoredContent). -
b412a2e — 8-14% performance improvement to
Parser::next()by replacing the match-driven approach with a table-driven lookup. -
15945a1 — 4-7% performance improvement to
Parser::next()by eliminating a localContentvariable that was causing the compiler to emit an unnecessary drop guard. -
9dfb704 — ~0.5-1% performance improvement from refactoring parser stack pop.
-
eb0724a — ~5% performance improvement to
Parser::content()fetch path.
Other non-breaking
-
855dba6 — Finish documenting
pipemodule. -
08ebf3a — Finish documenting
statemodule. -
07a42f4 — Parser lookup table tweak eliminating
.peek()calls for non-structured values inside arrays/objects. -
c5c88fb — Limit size-of assertions to 64-bit systems to prevent spurious build failures on 32-bit targets.
v0.7.0
Features
- Improve scanning and parsing performance 15X-20X
Material breaking changes
lexical::state::Machineis completely changed, effectively a total rewrite.lexical::ErrorKind::BadSurrogateno longer has theoffsetfield.
Other changes
- Fixed a bug where
PipeAnalyzerwould return an early EOF if given an emptyBytesvalue.