Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47,450 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 CUSTOM NODE — THE PRE-WARMED POOL ENGINE

This is a highly specialized fork of Node.js that fundamentally solves the boot-latency problem of standard worker_threads by implementing The Ultimate Pre-Warmed Node Pool.

By utilizing Lazy Initialization, this custom engine boots a persistent pool of standard Node.js environments in the background the moment you first request parallelization. This provides near-zero overhead parallelism while maintaining 100% full compatibility with standard Node.js modules (fs, http, setTimeout, etc).


🛠️ The Global API

The Custom Node Engine exposes a global Thread object and prototype methods on Array directly in JavaScript without needing to import any modules.

Thread.spawn(fn, ...args)

Offloads a function to the pre-warmed pool.

  • Returns: A Promise that resolves with the return value of the function.

Thread.join(promise)

Syntactic sugar for await. Waits for a thread to finish and retrieves its return value.

Array.prototype.parallelMap(fn)

Automatically chunks the array across all available CPU cores, maps the data in parallel across the pre-warmed workers, and merges the result.

  • Returns: A Promise resolving to the mapped array.

Array.prototype.parallelFilter(fn)

Automatically chunks the array across all CPU cores, filters the data in parallel, and merges the result.

  • Returns: A Promise resolving to the filtered array.

📊 Comprehensive Edge-Case Benchmarks

Test Environment: Windows 11, 8 CPU Cores.

We put Normal Node, Bun, and Our Custom Engine through extreme edge cases to observe boot-latency, payload serialization, and API compatibility.

Engine Scenario Time (ms) RAM Overhead Status
Normal Node 1: Micro-Task Flooding (500 workers) 1402.38 ms +565.12 MB ❌ Slow Boot
Bun 1: Micro-Task Flooding (500 workers) 10413.79 ms +10662.78 MB ❌ Severe Bloat
Custom Node 1: Micro-Task Flooding (500 workers) 55.94 ms +202.32 MB 🏆 Blazing Fast
Normal Node 2: 10MB Payload Serialization 40.28 ms +9.39 MB ✔️ Passes
Bun 2: 10MB Payload Serialization 45.76 ms +0.00 MB ✔️ Passes
Custom Node 2: 10MB Payload Serialization 9.74 ms +50.02 MB 🏆 Fast IPC
Normal Node 3: Async I/O & Timers (setTimeout) 35.78 ms +2.88 MB ✔️ Passes
Bun 3: Async I/O & Timers (setTimeout) 74.40 ms +0.00 MB ✔️ Passes
Custom Node 3: Async I/O & Timers (setTimeout) 12.47 ms +0.09 MB 🏆 Full API Support

Note

The Architecture Trade-off: Notice the flat ~200MB RAM overhead for Custom Node in Scenario 1. This is the exact cost of the 16 Pre-Warmed Node.js instances (16 * ~12MB = ~200MB). Because we pay this RAM cost upfront via Lazy Initialization, our engine completes 500 tasks in 55 milliseconds, while Normal Node takes 1.4 seconds, and Bun entirely melts down, consuming 10GB of RAM and taking 10 seconds.


🏎️ Raw CPU Performance (Fibonacci 35)

Executing Fibonacci(35) simultaneously across 4 background threads.

  • Normal Node.js: 98.60 ms
  • Bun: 80.30 ms
  • Our Custom Engine: 71.38 ms

Our engine successfully matches Bun's optimized performance, while simultaneously supporting the entire ecosystem of standard Node.js asynchronous APIs, and completely destroying Bun's severe multi-threading memory leak.

For full architectural details, see the extensive multithreading documentation.

About

Node.js JavaScript runtime with Multithreading V8 engine

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages