@@ -172,50 +172,55 @@ morph is built in Rust and optimized for high-throughput data pipelines.
172172
173173### Current Throughput (Criterion)
174174
175- Benchmarks are run at 100, 1,000, and 10,000 record scales .
175+ Measured from ` cargo bench --bench benchmarks ` on macOS arm64 (Feb 2026) .
176176
177177#### Parsing
178178
179179| Format | 100 records | 1,000 records | 10,000 records |
180180| --------| ------------| ---------------| ----------------|
181- | JSON | ~ 118 MiB/s | ~ 121 MiB/s | ~ 121 MiB/s |
182- | CSV | ~ 72 MiB/s | ~ 92 MiB/s | ~ 99 MiB/s |
183- | YAML | ~ 27 MiB/s | ~ 26 MiB/s | ~ 24 MiB/s |
181+ | JSON | ~ 127 MiB/s | ~ 129 MiB/s | ~ 129 MiB/s |
182+ | CSV | ~ 79 MiB/s | ~ 97 MiB/s | ~ 103 MiB/s |
183+ | YAML | ~ 28 MiB/s | ~ 29 MiB/s | ~ 29 MiB/s |
184184
185185#### Format Conversion
186186
187187| Conversion | 100 records | 1,000 records | 10,000 records |
188188| ----------------| ------------| ---------------| ----------------|
189- | JSON → YAML | ~ 65 MiB/s | ~ 60 MiB/s | ~ 55 MiB/s |
190- | CSV → JSON | ~ 55 MiB/s | ~ 70 MiB/s | ~ 75 MiB/s |
189+ | JSON → YAML | ~ 41 MiB/s | ~ 41 MiB/s | ~ 42 MiB/s |
190+ | CSV → JSON | ~ 43 MiB/s | ~ 50 MiB/s | ~ 54 MiB/s |
191191
192192#### Mapping Overhead
193193
194194| Operation | 10,000 records |
195195| ---------------------| ----------------|
196- | ` rename ` (1 field) | ~ 2 ms |
197- | ` where ` (filter) | ~ 3 ms |
198- | Complex pipeline* | ~ 5 ms |
196+ | ` rename ` (1 field) | ~ 3.8 ms |
197+ | ` where ` (filter) | ~ 3.0 ms |
198+ | Complex pipeline* | ~ 3.8 ms |
199199
200200\* * rename + set + drop + cast combined*
201201
202- ### Comparisons (jq / yq / mlr )
202+ ### Head-to-Head (actual )
203203
204- People care about head-to-head comparisons, so morph includes a reproducible benchmark workflow and dataset-driven methodology.
204+ 10,000-record JSON mapping task ( ` rename .name -> .username ` + ` where .age > 30 ` ), same input file, same machine:
205205
206- ``` bash
207- # morph baseline
208- cargo bench
206+ | Tool | Mean runtime | Median runtime | Relative |
207+ | ------| --------------| ----------------| ----------|
208+ | ** morph** | ** 20.1 ms** | ** 20.0 ms** | ** 1.00x** |
209+ | jq | 46.1 ms | 46.3 ms | 2.29x slower |
210+
211+ This test was run with warm cache and 12 timed iterations after warmup.
209212
210- # Example external tool comparisons (same input/output task)
211- # jq + yq chain
212- hyperfine ' cat bench/data.json | jq -c . | yq -P > /tmp/out.yaml'
213+ ### Comparison commands
214+
215+ ``` bash
216+ # morph
217+ ./target/release/morph -i /tmp/morph_bench.json -o /tmp/morph_out.json -m /tmp/morph_map.morph
213218
214- # miller
215- hyperfine ' mlr --ijson --ocsv cat bench/data .json > /tmp/out.csv '
219+ # jq equivalent
220+ jq ' map(select(.age > 30) | .username=.name | del(.name)) ' /tmp/morph_bench .json > /tmp/jq_out.json
216221```
217222
218- We publish morph's own Criterion numbers in this README, and cross-tool comparison numbers once they are measured on pinned hardware in CI .
223+ More cross-tool comparisons (yq/mlr) will be added as those tools are available in CI on pinned hardware.
219224
220225### Run Benchmarks Locally
221226
0 commit comments