Skip to content

Benchmark Performance Report

Path-IoC is engineered to provide extreme microsecond performance in micro-modular enterprise codebases and serverless edge runtimes.

The following hardware-verified benchmarks were executed using the test suites under @path-ioc/benchmarks.


Benchmark Environment

  • Processor: Apple M5 (arm64-darwin)
  • Runtime: Node.js v24.3.0
  • Testing Harness: Mitata / High-Precision Performance Benchmark
  • Sample Topology: Fully-connected Directed Acyclic Graph with cross-dependencies, short alias lookups, and cycle detection

Measured Performance Matrix

Target FunctionGraph ComplexityMean Durationp75p99Throughput (Ops/sec)
instantiateModuleContainer50 Nodes21.2 µs22.0 µs93.5 µs~47,000 /s
instantiateModuleContainer500 Nodes227 µs269 µs581 µs~4,400 /s
instantiateModuleContainer2,000 Nodes1.17 ms1.33 ms3.03 ms~850 /s
compileModuleGraph50 Nodes90.8 µs94.2 µs286 µs~11,000 /s
compileModuleGraph500 Nodes1.72 ms1.82 ms6.97 msOnce per cold boot
compileModuleGraph2,000 Nodes15.5 ms17.0 ms23.5 msExtreme topology limit

Architectural Analysis

1. Why Does 50-Node Instantiation Take Only 21.2 Microseconds?

  • Zero Reflection & Zero Metadata Lookups: Eliminates repetitive Reflect.getMetadata dictionary lookups on object construction.
  • Direct Closure Inlining: The pre-compiled execution plan is a flat, contiguous sequence. JavaScript engines (V8 / JavaScriptCore) optimize this directly via JIT loop unrolling and function inlining.

2. Why Pure JavaScript Outperforms WebAssembly (WASM) Here

Empirical tests reveal that crossing the WebAssembly FFI boundary to manipulate JavaScript objects incurs ~1ms to 2ms in handle management and serialization overhead. In contrast, Path-IoC's native JavaScript execution completes in 0.02ms (21.2 µs)—running approximately 100x faster than WebAssembly for pure object graph resolution.

Released under the MIT License.