From 8dcd85b69ba883dbd0a6807c99f7d0db9b711aa0 Mon Sep 17 00:00:00 2001 From: not-matthias Date: Fri, 23 Oct 2026 14:03:49 +0200 Subject: [PATCH] fix(core): compile analysis workloads eagerly with sparkplug Avoid dependence on Sparkplug tiering and compilation batches during analysis measurements. Keep optimizing compilers disabled and walltime unchanged. Document the baseline shift and remaining inline-cache sensitivity. --- docs/introspection.md | 12 ++++++++++++ packages/core/src/introspection.ts | 1 + 2 files changed, 13 insertions(+) diff --git a/docs/introspection.md b/docs/introspection.md index 9e3fe464..6bd9fd2b 100644 --- a/docs/introspection.md +++ b/docs/introspection.md @@ -1,3 +1,15 @@ +## Analysis-mode V8 flags + +Simulation (including the `instrumentation` alias) and memory mode use +`--always-sparkplug` to compile eligible JavaScript functions directly to baseline +machine code instead of waiting for V8's tiering and batch-compilation thresholds. +This reduces sensitivity to unrelated code triggering compilation before a +benchmark is measured. TurboFan remains disabled with `--no-opt`, and Maglev is +explicitly disabled on Node.js 24 and newer. + +This changes the measurement baseline compared with earlier releases. It does not +isolate inline-cache feedback from other benchmarks. Walltime flags are unchanged. + ## Testing introspection locally 1. Inside `codspeed-node` directory, run `export PATH="$pwd/../action/dist/bin:$PATH"`. diff --git a/packages/core/src/introspection.ts b/packages/core/src/introspection.ts index f4ac29ef..18c29ba0 100644 --- a/packages/core/src/introspection.ts +++ b/packages/core/src/introspection.ts @@ -20,6 +20,7 @@ export const getV8Flags = () => { "--hash-seed=1", "--random-seed=1", "--no-opt", + "--always-sparkplug", "--predictable", "--predictable-gc-schedule", "--expose-gc",