Skip to content

Commit 3d35e65

Browse files
committed
docs: indicative Node vs Bun speed (packaging); trim benchmark cross-ref
1 parent f171bb9 commit 3d35e65

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

docs/benchmark.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Each scenario runs both approaches back-to-back on the same machine, same data.
5353
This document measures **indexed SQL vs traditional glob/read** on an existing database — **not** process startup time or **Node vs Bun** as runtimes.
5454

5555
- **Lazy CLI:** **`dist/index.mjs`** stays small; **`codemap --help`** / **`version`** load only bootstrap + the matching **dynamic import** chunk ([architecture.md § Layering](./architecture.md#layering)).
56-
- **Node vs Bun:** expect **lower latency** for short commands under **Bun** (typical in local checks); **full index** wall time varies by machine and cold cache. **`console.table`** output can differ slightly between runtimes for the same query rows. Same SQL semantics: [packaging.md § Node vs Bun](./packaging.md#node-vs-bun).
56+
- **Node vs Bun:** **`console.table`** output can differ slightly; SQL semantics match ([packaging.md § Node vs Bun](./packaging.md#node-vs-bun)). Indicative startup / small-rebuild speed ratios are documented there — this benchmark file does not measure Node vs Bun.
5757

5858
**CI** runs **`node dist/index.mjs query "SELECT 1"`** after build to smoke-test the **Node + better-sqlite3** path ([`ci.yml`](../.github/workflows/ci.yml)).
5959

docs/packaging.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ One schema and SQL surface; backend is chosen in **`src/sqlite-db.ts`**: **`bett
4040

4141
**Checking both runtimes** after **`bun run build`**: run the same commands with **`node dist/index.mjs …`** and **`bun dist/index.mjs …`** (e.g. **`--version`**, **`query "SELECT 1"`**, **`CODEMAP_ROOT=fixtures/minimal`** **`--full`**). Startup and **`console.table`** formatting may differ; row counts and index stats should match.
4242

43+
**Speed (indicative, same machine — not a spec):** Bun is often **~1.5×** faster than Node for **`--version`** and short **`query`** (process startup + loading **`dist/`**). A **`fixtures/minimal`** **`--full`** rebuild is often **~** faster on Bun by median wall time; first runs can be noisier. Large-app full rebuilds follow the same idea but scale with tree size and I/O.
44+
4345
| Track | Where |
4446
| ------------ | ------------------------------------------------------------------------------------------------------ |
4547
| **CI** | `node dist/index.mjs query "SELECT 1"` after build ([`ci.yml`](../.github/workflows/ci.yml)). |

0 commit comments

Comments
 (0)