Performance Benchmarks¶
This page contains the first public performance measurements of Zero The Hero against the stock otool
on macOS, using the system kernel as the test target.
Benchmarks¶
Benchmark #1 — MacOS Kernel¶
Zero The Hero (ZtH)¶
Target: /System/Library/Kernels/kernel
Runs: 10 consecutive loads in REPL mode
Metrics: Cold + warm runs included
Notes: Times are in microseconds (µs
) or milliseconds (ms
) as reported by ZtH itself.
P1
= strategic commands (versioning), P2
= core commands, P3
= less frequent commands.
Run |
File Load |
Headers Parse |
LC Parse |
Preparse |
P1 |
P2 |
P3 |
Total Deep Parsing |
---|---|---|---|---|---|---|---|---|
1 |
3.447 ms |
118.083 µs |
106.709 µs |
103.208 µs |
47.875 µs |
658.167 µs |
117.750 µs |
823.792 µs |
2 |
746.250 µs |
8.625 µs |
106.416 µs |
839.708 µs |
40.875 µs |
85.625 µs |
17.417 µs |
143.917 µs |
3 |
324.375 µs |
8.292 µs |
109.917 µs |
75.000 µs |
20.500 µs |
76.000 µs |
15.542 µs |
112.042 µs |
4 |
973.625 µs |
8.125 µs |
180.750 µs |
151.458 µs |
18.833 µs |
71.125 µs |
21.417 µs |
111.375 µs |
5 |
182.375 µs |
8.917 µs |
169.125 µs |
90.416 µs |
14.000 µs |
67.209 µs |
18.458 µs |
99.667 µs |
6 |
2.362 ms |
15.125 µs |
116.750 µs |
34.250 µs |
13.000 µs |
57.292 µs |
12.292 µs |
82.584 µs |
7 |
557.792 µs |
8.083 µs |
313.125 µs |
52.125 µs |
20.292 µs |
74.584 µs |
20.291 µs |
115.167 µs |
8 |
297.791 µs |
8.334 µs |
95.666 µs |
27.541 µs |
17.833 µs |
63.583 µs |
19.833 µs |
101.249 µs |
9 |
613.250 µs |
9.084 µs |
171.042 µs |
46.917 µs |
24.625 µs |
137.917 µs |
26.750 µs |
189.292 µs |
10 |
315.292 µs |
6.333 µs |
336.125 µs |
30.833 µs |
15.417 µs |
52.250 µs |
16.250 µs |
83.917 µs |
Average Deep Parsing Time: ~186.70 µs
Observation: Most of the time is in P2 (core commands), as expected.
otool¶
Command:
for i in {1..10}; do
echo -n "$i,"
gtime -f "%U,%S,%e,%K" otool -l /System/Library/Kernels/kernel 2>/dev/null
done
otool Benchmark Results¶
Output Format:
Run,User Time,Sys Time,Elapsed Time,Memory (KB)
Run |
User Time (s) |
Sys Time (s) |
Elapsed Time (s) |
Memory (KB) |
---|---|---|---|---|
1 |
0.02 |
0.00 |
0.01 |
1488 |
2 |
0.01 |
0.00 |
0.00 |
1488 |
3 |
0.01 |
0.00 |
0.00 |
1488 |
4 |
0.01 |
0.00 |
0.00 |
1536 |
5 |
0.01 |
0.00 |
0.00 |
1488 |
6 |
0.01 |
0.00 |
0.00 |
1488 |
7 |
0.01 |
0.00 |
0.00 |
1488 |
8 |
0.01 |
0.00 |
0.00 |
1488 |
9 |
0.01 |
0.00 |
0.00 |
1488 |
10 |
0.01 |
0.00 |
0.00 |
1488 |
Mean Elapsed Time: ~0.011 s
Mean Memory Usage: ~1.49 MB
Speed Advantage¶
When compared to the ZtH (Zero-the-Hero) benchmark on the same kernel
Mach-O file:
ZtH Mean Elapsed Time: ~0.00056 s (deep parsing included)
otool Mean Elapsed Time: ~0.011 s
Speed Advantage:
ZtH is approximately 19–20× faster than otool in this benchmark scenario.
Methodology Notes¶
Hardware: Apple Silicon Mac (ARM64) running macOS 15.3.2. All the tests have been executed on the same configuration.
Test File:
/System/Library/Kernels/kernel
(Mach-O 64-bit, AMD64 architecture).Command for otool:
gtime -f "%x,%U,%S,%e,%M" otool -l /System/Library/Kernels/kernel
Preliminary Comparison¶
Speedup: ZtH load+parse mean ~1.50 ms vs
otool -l
mean ~11.0 ms - ZtH is ≈7.3× faster.Granularity: ZtH exposes per-phase timings (load, headers, LC parse, preparse, deep P1/P2/P3).
otool
exposes only aggregate real/user/sys time.Where time goes (ZtH): Deep parsing averages ~186 µs, dominated by P2 core commands (~70–80%). File I/O (load) shows the most variance due to cache effects.
Method parity: For fairness,
otool
output was discarded to avoid terminal overhead; ZtH timings are internal and unaffected by rendering.These benchmarks are not final — they’re a first look. We’ll expand to multi-arch, multi-platform testing and publish a full methodology with the official release.
Cypherpunks write code