diff options
| author | Gabriel Schneider <[email protected]> | 2026-08-25 19:29:07 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-08-25 19:29:07 -0300 |
| commit | 48b1060fa66f5f69dac6d652b4013cdaf1d2bd1f (patch) | |
| tree | 8f554b01b4d12edb259e1855e309832ec121cd3d /test/perf.zig | |
| parent | c0c722167a7c4d370c09eab4be0f777cef43feb4 (diff) | |
| download | pardes-48b1060fa66f5f69dac6d652b4013cdaf1d2bd1f.tar.gz pardes-48b1060fa66f5f69dac6d652b4013cdaf1d2bd1f.zip | |
Never build the P4 object Debug; the measured mode becomes the default
`-Doptimize` defaults to Debug, so the naive `zig build -Dplatform=p4` produced an
object that CANNOT RUN. Debug wraps every tier in `allocators.zig` in a
`DebugAllocator`, whose metadata is page-granular, and one 4 KiB page per size class
does not fit in the 384 KiB the board hands the editor: the image links, flashes, and
then dies in `Pardes.init`. Nothing said so, because every build in this session
happened to pass `-Doptimize=` explicitly.
The p4 target now falls back to ReleaseFast, and that mode was measured rather than
preferred. On the die, against ReleaseSmall over 5 document lengths x 7 trials:
configuration fixed per char at 160 chars
ReleaseSmall 16.99 ms 54.3 us 25.56 ms
ReleaseFast 14.85 ms 34.7 us 20.30 ms 0.79x
13% off the fixed per-keystroke cost, 36% off the per-character cost, for 35% more
flash on a partition that is 39% used. An explicit `-Doptimize=` still wins, so
ReleaseSmall stays one flag away when flash matters more than latency - which is why
this is a fallback and not a hard override.
Following the file's own convention: the web target has pinned ReleaseSmall
unconditionally for the same kind of reason (size is its budget) since before this.
Diffstat (limited to 'test/perf.zig')
0 files changed, 0 insertions, 0 deletions
