jiter
jiter copied to clipboard
Batson
Adding "batson" binary alternative to JSON code crate.
From the README:
Binary Alternative To (J)SON. Designed to be very fast to query.
Inspired by Postgres' JSONB type and Snowflake's VARIANT type.
For a relatively small JSON document (3KB), batson is 14 to 126x faster than Jiter, and 106 to 588x faster than Serde.
test medium_get_str_found_batson ... bench: 51 ns/iter (+/- 1)
test medium_get_str_found_jiter ... bench: 755 ns/iter (+/- 66)
test medium_get_str_found_serde ... bench: 5,420 ns/iter (+/- 93)
test medium_get_str_missing_batson ... bench: 9 ns/iter (+/- 0)
test medium_get_str_missing_jiter ... bench: 1,135 ns/iter (+/- 46)
test medium_get_str_missing_serde ... bench: 5,292 ns/iter (+/- 324)
Codecov Report
Attention: Patch coverage is 82.44804% with 304 lines in your changes missing coverage. Please review.
Project coverage is 87.58%. Comparing base (
82d7146) to head (6513df5). Report is 1 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #136 +/- ##
==========================================
- Coverage 90.94% 87.58% -3.36%
==========================================
Files 12 21 +9
Lines 2042 3770 +1728
Branches 2042 3770 +1728
==========================================
+ Hits 1857 3302 +1445
- Misses 112 248 +136
- Partials 73 220 +147
| Files with missing lines | Coverage Δ | |
|---|---|---|
| crates/jiter/src/lazy_index_map.rs | 97.03% <100.00%> (+1.07%) |
:arrow_up: |
| crates/jiter/src/python.rs | 97.43% <100.00%> (ø) |
|
| crates/jiter/src/value.rs | 82.35% <100.00%> (+0.64%) |
:arrow_up: |
| crates/batson/src/json_writer.rs | 94.66% <94.66%> (ø) |
|
| crates/batson/src/lib.rs | 85.00% <85.00%> (ø) |
|
| crates/batson/src/encoder.rs | 91.13% <91.13%> (ø) |
|
| crates/batson/src/get.rs | 84.69% <84.69%> (ø) |
|
| crates/batson/src/errors.rs | 0.00% <0.00%> (ø) |
|
| crates/batson/src/header.rs | 78.04% <78.04%> (ø) |
|
| crates/batson/src/array.rs | 87.40% <87.40%> (ø) |
|
| ... and 2 more |
... and 1 file with indirect coverage changes
Continue to review full report in Codecov by Sentry.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 82d7146...6513df5. Read the comment docs.
CodSpeed Performance Report
Merging #136 will improve performances by 11.69%
Comparing batson (6513df5) with main (ae5fc7d)
Summary
⚡ 1 improvements
✅ 72 untouched benchmarks
Benchmarks breakdown
| Benchmark | main |
batson |
Change | |
|---|---|---|---|---|
| ⚡ | sentence_jiter_iter |
7.8 µs | 6.9 µs | +11.69% |