Skip to content

Latest commit

 

History

History
74 lines (61 loc) · 3.49 KB

File metadata and controls

74 lines (61 loc) · 3.49 KB

Benchmark: lib

Date: 2026-07-10 Project: lib (6 files, 15,521 tokens) Index: 19 chunks from 6 files in 3.2s

Results Summary

Metric Value
Retrieval savings 93.6% (full files → relevant chunks)
Compression savings 54.3% (chunks → signatures)
Combined 97.1% (full files → compressed chunks)
Avg full-file baseline 14,908 tokens/query
Avg after retrieval 961 tokens/query
Avg after compression 439 tokens/query
Precision@10 0.18
Recall@10 1.00
Latency p50 2.7ms
Queries tested 20

Per-Layer Savings (each measured independently)

Each layer has its own baseline. These are NOT stacked.

Layer What it does Savings Method
Retrieval Full files → relevant code chunks 94% measured
Chunk Compression Raw chunks → signatures + docstrings 54% measured
Output Compression Reduces Claude's reply length 70% estimated
Grammar Drops articles/fillers from memory text 13% measured

Token Flow

Full files (avg):      14,908 tokens
  → After retrieval:   961 tokens  (93.6% saved)
  → After compression: 439 tokens  (54.3% more saved)
Combined savings:      97.1%

Per-Query Results

Query Full file Chunks Compressed Retrieval Compression P@10 R@10
How does Express initialize the applicat 15,521 813 435 95% 46% 0.17 1.00
How does app.use() register middleware o 15,521 706 426 96% 40% 0.17 1.00
How does app.handle() dispatch an incomi 15,521 1,050 433 93% 59% 0.17 1.00
How does app.set() and app.enabled() man 15,521 815 416 95% 49% 0.17 1.00
How does app.render() render a view with 15,521 679 399 96% 41% 0.33 1.00
How does Express resolve and load view t 15,521 851 440 94% 48% 0.17 1.00
How does res.send() determine the respon 12,458 1,396 550 89% 61% 0.20 1.00
How does res.json() serialize an object 15,521 1,310 476 92% 64% 0.17 1.00
How does res.sendFile() stream a file to 15,521 955 350 94% 63% 0.17 1.00
How does res.download() set the Content- 15,521 1,027 410 93% 60% 0.17 1.00
How does res.status() and res.sendStatus 12,458 981 472 92% 52% 0.20 1.00
How does res.cookie() and res.clearCooki 12,458 1,222 474 90% 61% 0.20 1.00
How does req.accepts() perform content n 15,521 1,183 447 92% 62% 0.17 1.00
How does req.get() and req.header() read 15,521 1,202 466 92% 61% 0.17 1.00
How does req.is() check the request's Co 15,521 967 470 94% 51% 0.17 1.00
How does req.range() parse a Range heade 15,521 1,183 447 92% 62% 0.17 1.00
How does Express generate an ETag for a 12,458 702 422 94% 40% 0.20 1.00
How does Express compile and normalize c 15,521 656 388 96% 41% 0.17 1.00
How does the express() factory function 15,521 718 438 95% 39% 0.17 1.00
How does Express expose the json, urlenc 15,521 807 429 95% 47% 0.17 1.00

How to Reproduce

pip install code-context-engine
python benchmarks/run_benchmark.py --repo https://github.com/expressjs/express.git --source-dir lib

Results generated by CCE benchmark suite on 2026-07-10.