# Token-size benchmark: memex context vs. git baselines
A comparison of context-payload sizes for three representative nodes. Approximate tokens at chars / 4 (close enough for an order-of-magnitude comparison; not exact tokenizer output).
This was the alternative to issue #38's full N=5 multi-arm benchmark. See `scripts/context-size.sh` for the script and the PR description for the methodology discussion.
## Method
For each node:
- **memex**: `cargo run -- context <id> --format markdown --depth 3`
- **git log (messages only)**: `git log --pretty=fuller -- <key_artifacts>` - what a non-memex user might scroll through.
- **git log -p (with diffs)**: same plus full diffs - the "everything available" upper bound an agent could be given.
- **PR body**: `gh pr view <num>` title + body for the PR matching the node's `git_ref`.
Reproduce with `scripts/context-size.sh <node-id>` from the repo root. Numbers captured 2026-05-03 against `main` at `44219c2`.
## Results
### Decision-heavy: `5a17fac4` - Audit and correct memex graph parent misassignments
Has 4 decisions and 3 rejected approaches in its memex summary.
### Refactor with motivation: `b95077e3` - Remove graph.edges dual representation
Has 1 decision and 1 rejected approach.
### Shallow / negative control: `27ed3dfa` - Declare MSRV
Has 2 decisions and 0 rejected approaches. Memex shouldn't help much here.
overlap ("rust-version = 1.74 because clap 4 requires it" appears in both). For
shallow tasks the project-context preamble that memex always emits (root goal,
key decisions, key artifacts) is fixed overhead that dominates the payload.
## Caveats
- These three nodes don't provide a meaningful sample of possible use-cases. The point of this file is to make the comparison **reproducible and inspectable**, not to make a statistical claim. You can run the script on your own nodes and judge for yourself.
- Token counts are approximate (chars / 4). The realistic-baseline column adds log + PR; users may paste more or less than that. The ratios are what matter.
- All three nodes come from this repo, which is authored by a memex user. A non-memex repo would have different commit-message and PR-body length distributions, which affects the baseline.