YAML export

View Source

Compares the former JSON round trip with direct YAML encoding of normalized native values.

Recorded at 2026-09-11T08:37:50.983973Z with mix bench. AshOaskit 0.4.1, Benchee 1.5.1, benchee_markdown 0.3.4.

Inputs and correctness checks are outside timed work. Scenarios run serially with 2 seconds of warmup, 5 seconds of runtime measurement, 1 second of memory measurement, and 1 second of reduction measurement. Slow scenarios may collect few samples; these measurements are observations, not guarantees.

Memory results measure allocations in the benchmarked process, not peak resident memory or allocations in other processes. See methodology.

System

Benchmark suite executing on the following system:

Operating System macOS
CPU Information Apple M5 Pro
Number of Available Cores 18
Available Memory 48 GB
Elixir Version 1.20.4
Erlang Version 28.5.0.6

Configuration

Benchmark suite executing with the following configuration:

:time 5 s
:parallel 1
:warmup 2 s

Statistics

Input: 100 schemas (18045 JSON bytes)

Run Time

Name IPS Average Deviation Median 99th %
direct YAML 4.19 K 238.69 µs ±13.99% 226.17 µs 352.69 µs
JSON round trip then YAML 2.11 K 474.95 µs ±9.50% 464.71 µs 602.38 µs

Run Time Comparison

Name IPS Slower
direct YAML 4.19 K  
JSON round trip then YAML 2.11 K 1.99x

Memory Usage

Name Average Factor
direct YAML 574.63 KB  
JSON round trip then YAML 1000.88 KB 1.74x

Reduction Count

Name Average Factor
direct YAML 85.58 K  
JSON round trip then YAML 141.65 K 1.66x

Input: 500 schemas (90445 JSON bytes)

Run Time

Name IPS Average Deviation Median 99th %
direct YAML 832.84 1.20 ms ±8.13% 1.16 ms 1.47 ms
JSON round trip then YAML 420.46 2.38 ms ±6.38% 2.37 ms 2.79 ms

Run Time Comparison

Name IPS Slower
direct YAML 832.84  
JSON round trip then YAML 420.46 1.98x

Memory Usage

Name Average Factor
direct YAML 2.79 MB  
JSON round trip then YAML 4.85 MB 1.74x

Reduction Count

Name Average Factor
direct YAML 416.18 K  
JSON round trip then YAML 690.23 K 1.66x

Input: 1000 schemas (180947 JSON bytes)

Run Time

Name IPS Average Deviation Median 99th %
direct YAML 387.82 2.58 ms ±8.02% 2.52 ms 3.12 ms
JSON round trip then YAML 199.77 5.01 ms ±3.54% 4.98 ms 5.56 ms

Run Time Comparison

Name IPS Slower
direct YAML 387.82  
JSON round trip then YAML 199.77 1.94x

Memory Usage

Name Average Factor
direct YAML 5.57 MB  
JSON round trip then YAML 9.69 MB 1.74x

Reduction Count

Name Average Factor
direct YAML 0.82 M  
JSON round trip then YAML 1.36 M 1.66x