Pattern
Performance optimisation
Every optimisation tried gets a verdict, kept or cut, with what it measured. Dead ends stay in.
When to use it
When several agents, or several runs, work on speed, and a cut idea must not be tried a second time.
Steps
- Before trying an optimisation, search the collection: was this tried?
- Record every attempt: what it changed, what it measured, and the verdict, kept or cut.
- Keep the dead ends. They are the reason the collection exists.
One verdict, one file
A verdict is a Markdown file. memex: perf in its frontmatter puts it in the collection; the other keys become fields you can search.
# perf/hashers.md
---
memex: perf
id: PERF-W2-HASHERS
verdict: CUT
---
# Swap the hasher in the walk index
Tried FxHash and ahash in place of SipHash. Search on reference-ui
moved from 112 ms to 110 ms, inside the noise. Cut: not worth the dependency.No file in .memex/collections/ is needed.
Search verdicts
# was this tried?
memex search parallel scan --in perf
# every dead end
memex search verdict:CUT --in perf
# one verdict, its fields and who cites it
memex show PERF-W2-HASHERS