JIT Compilation Benchmark

150× Faster JIT Compilation.
82ms Graph Build.

AADC delivers the best combination of fast JIT compilation and fast execution for Monte Carlo Greeks computation.

AADC JIT graph compilation takes 82ms (vs 12.5s for JAX XLA), making it ideal for real-time pricing where trade structures change frequently.

See where JIT compilation is problematic for quant finance workflows.

150×
Faster JIT compilation than JAX
82ms
AADC JIT compilation time
4.1×
Faster Greeks than PyTorch
Model: GBM Asian Option Monte Carlo
Trades: 100
Scenarios: 100,000
Timesteps: 252
Threads: 8

Total Eval Time = JIT Compilation + Execution

This is the CRITICAL metric for production. JAX is fast after warm-up, but 12.5s JIT compilation makes it unsuitable for dynamic trade structures.

Production Reality: Why JIT Compilation Time Matters
JIT compilation happens on every cold start: model changes, parameter updates, or process restarts. Small benchmarks (10 trades × 10K scenarios) may show acceptable overhead, but this isn't production-representative. At scale, tools with slow JIT compilation become unusable.

The Problem Heavy JIT Compilation

JAX XLA takes 12.5 seconds to JIT compile. TensorFlow takes 18 seconds. Enzyme-AD takes 2 seconds. This happens every time trade parameters change.

For real-time pricing: Unacceptable
vs
AADC Solution 82ms JIT Compilation

AADC JIT graph compilation takes 82 milliseconds. Combined with fast execution, total time is 6.5 seconds vs 19 seconds for JAX.

Result: 150× faster JIT compilation
2.9× faster total first-run

Where JIT Compilation is Problematic

JIT compilation creates significant issues in these quant finance workflows:

RFQs (Request for Quote)

Traders need instant quotes for new trade structures. A 12+ second wait for JIT compilation is unacceptable for competitive pricing.

Intraday Risk

Parameters change throughout the day. Every market data update or position change triggers recompilation.

Production Restarts

Kubernetes pod restarts, deployments, and failovers all trigger cold starts with full JIT compilation overhead.

Exotic Derivatives

Unique payoff structures require new compilation each time. No benefit from warm caches.

First-Run Performance for Greeks

Lower is better. JIT compilation time shown in lighter shade.

JIT Compilation
Execution
AADC C++
2,183ms
AADC Python
6,529ms
C++ (FD)
14,272ms
14,272ms
PyTorch
26,407ms
26,407ms
NumPy (FD)
130,775ms
130,775ms
JAX (XLA)
19,000ms
TensorFlow
18,000ms
24,100ms
Autograd
173,800ms
173,800ms

FD = Finite Difference (4× pricing for Delta, Rho, Vega)

⏱️

JIT Compilation Time Only

AADC C++
19ms
AADC Python
82ms
Enzyme-AD
2,054ms
JAX (XLA)
12,500ms
TensorFlow
18,000ms

AADC Advantage: 150× faster JIT compilation than JAX. Critical for real-time pricing where trade structures change.

🚀

Execution Time (Steady State)

AADC C++
2,164ms
TensorFlow
6,100ms
AADC Python
6,447ms
JAX (XLA)
6,500ms
PyTorch
26,407ms

Note: JAX is fast after warm-up, but 12.5s JIT compilation penalty makes it unsuitable for dynamic trade structures.

When to Use Each Tool

AADC

Recommended Fast AND simple
  • Real-time pricing & risk
  • Dynamic trade parameters
  • Low-latency requirements
  • Production quant systems
🔧

JAX / TensorFlow

ML Training Fast after warm-up
  • ML model training
  • Batch inference (same structure)
  • GPU acceleration needed
  • ✗ Not for dynamic structures
🔬

PyTorch / Autograd

Research Simple but slow
  • Research & prototyping
  • Educational purposes
  • Small-scale experiments
  • ✗ Not for production scale

Why JAX/TensorFlow JIT compilation is problematic for quant finance
Valuation graphs in derivatives pricing are significantly larger and more complex than typical ML models. A single exotic trade may generate millions of operations in the computational graph. JAX XLA and TensorFlow's JIT compilation passes scale poorly with graph size, resulting in 12-18 second JIT compilation times that repeat whenever trade parameters change.

In production environments where traders need real-time pricing for RFQs, intraday risk recalculation, or dynamic hedging, this JIT compilation overhead makes JAX/TensorFlow impractical for production deployment. AADC's 82ms JIT compilation enables responsive pricing even with changing trade structures.

Detailed Benchmark Data

Tool Compile (ms) Price Only (ms) Greeks (ms) Overhead Total (ms) Memory (MB) LOC
AADC C++ 19 1,715 2,164 +26% 2,183 192 50
AADC Python 82 4,929 6,447 +31% 6,529 195 176
C++ (FD) 0 2,048 14,272 +597% 14,272 192 880
PyTorch 0 10,953 26,407 +141% 26,407 192 350
NumPy (FD) 0 32,169 130,775 +307% 130,775 770 781
JAX (XLA) 12,500 4,600 6,500 +41% 19,000 80 400
TensorFlow 18,000 4,400 6,100 +39% 24,100 200 450
Autograd 0 43,500 173,800 +300% 173,800 197 629

FD = Finite Difference | LOC = Lines of Code | Memory = Peak during Greeks computation

Ready to Accelerate Your Greeks?

AADC delivers the best combination of fast JIT compilation and fast execution. Perfect for real-time pricing where trade structures change frequently.