Skip to content

Aegis.jsSilicon-Speed Zero-GC Flat Memory Arenas

Break through the V8 garbage collector wall. 64-byte hardware cache alignment, flyweight cursors, and 100M+ ops/sec with zero heap allocations.

Quick Example โ€‹

typescript
import { Aegis, uint32, float64, fixedString, boolean } from '@aventine/aegis-js';

// 1. Define a 64-byte aligned struct schema
const OrderSchema = Aegis.struct({
  orderId: uint32,
  price: float64,
  symbol: fixedString(8),
  filled: boolean,
});

// 2. Allocate a contiguous flat memory arena for 1,000,000 orders
const orderBook = Aegis.list(OrderSchema, { capacity: 1_000_000 });

// 3. Populate orders with zero object allocations
for (let i = 0; i < 1_000_000; i++) {
  orderBook.push({
    orderId: i,
    price: 150.25 + (i * 0.01),
    symbol: 'NVDA',
    filled: false,
  });
}

// 4. Iterate and compute at silicon speed with a single reusable cursor
let totalValue = 0;
orderBook.forEach(order => {
  totalValue += order.price;
});

console.log(`Computed 1,000,000 orders without a single GC pause: $${totalValue.toFixed(2)}`);

Performance Comparison โ€‹

MetricStandard V8 Objects (Array<{...}>)Aegis.js Arena (AegisList<T>)Advantage
500,000 Record Mutations142.60 ms4.21 ms33.8x Faster
Throughput3.50 Million ops/sec118.84 Million ops/sec33.9x Greater
V8 Heap Growth86.40 MB0.23 MB99.7% Less Heap
Stop-the-World GC PausesFrequent (12 - 45 ms pauses)Zero (Flatline 0 pauses)Deterministic Realtime
L1 Cache UtilizationCache thrashing across pointer graphSequential prefetch friendlyOptimal hardware throughput

Released under the Apache 2.0 License. Built for sovereign silicon performance.