deno
fd3da5a8 - perf(ops): replace per-op generated slow metrics wrappers with shared dispatch (#32889)

Commit
205 days ago
perf(ops): replace per-op generated slow metrics wrappers with shared dispatch (#32889) ## Summary - Replace N per-op generated `v8_fn_ptr_metrics` functions with a single shared `slow_metrics_dispatch` wrapper in `deno_core` - Add `slow_fn_impl: SlowFnImplRef` field to `OpDecl` storing a function pointer to the op's implementation (returns status code for success/error detection) - `OpDecl::new_internal_op2` now accepts `slow_fn_impl` instead of `slow_fn_with_metrics`, and automatically sets `slow_fn_with_metrics` to the shared wrapper - The non-metrics hot path (`v8_fn_ptr`) is completely unchanged — zero performance impact on normal op dispatch - ~460KB binary size reduction, -3075/+424 lines (most deletions are test snapshot updates) --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
Parents
Loading