perf: decode rewrite, encode zeros optimization, iai-callgrind benchmarks (0.3.1)
Decode rewritten with shrinking-slice pattern (split_first/split_at) instead of index arithmetic. Decode zeros 14% faster, decode nonzero flips from 5% behind corncobs to 2% ahead, decode mixed closes to tied. Encode zeros fast path moved before split_at — now tied with cobs (was 6% behind). Code size reduced to 821B (was 869B). Replaced criterion with iai-callgrind for deterministic instruction-count benchmarks via Valgrind. Zero run-to-run variance. Expanded to 162 benchmarks across 9 sizes. ucobs now wins or ties 16 of 18 benchmarks vs corncobs and cobs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
9 files changed
+420
-217
No files matched your search
+2
-2
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "ucobs"
|
||||
version = "0.3.0"
|
||||
version = "0.3.1"
|
||||
edition = "2021"
|
||||
rust-version = "1.93"
|
||||
license = "MIT"
|
||||
@@ -26,7 +26,7 @@ all-features = true
|
||||
[dev-dependencies]
|
||||
cobs = "0.5"
|
||||
corncobs = "0.1"
|
||||
criterion = { version = "0.8", features = ["html_reports"] }
|
||||
iai-callgrind = "0.16"
|
||||
proptest = "1"
|
||||
rand = "0.10"
|
||||
|
||||
|
||||
Reference in new issue
Block a user