C++ Scalability

AADC C++: Predictable
Linear Scaling

See how AADC C++ performance scales across three dimensions: threads, trades, and scenarios.

Near-linear scaling enables predictable performance for any workload size.

28.5x
Thread scaling (32 threads)
100x
Trades scaling (10-1000)
50x
Scenarios scaling (10K-500K)
~2 MB/1K
Memory per 1K scenarios
Model: GBM Asian Option MC
Timesteps: 252
Greeks: Delta, Rho, Vega
Language: C++ (AADC)

Predictable Linear Scaling

AADC C++ scales linearly across all dimensions

Near-Linear Thread Scaling

AADC C++ achieves 28.5x speedup going from 1 to 32 threads - near-ideal linear scaling with 89% efficiency

Linear Trades Scaling

Evaluation time scales linearly with trades - 100x more trades = 100x more time (predictable performance)

Linear Scenarios Scaling

Evaluation time scales linearly with scenarios - 500K scenarios takes exactly 50x longer than 10K scenarios

Memory Scales with Scenarios Only

Memory usage is ~1.9 MB per 1K scenarios, independent of trades or threads. 10K → 19 MB, 100K → 192 MB, 500K → 961 MB

Near-Linear Speedup to 32 Threads

1000 trades x 100K scenarios x 252 timesteps

Greeks Computation Time by Thread Count

1 thread
145.1s
1.0x
4 threads
31.0s
4.7x
8 threads
15.7s
9.2x
16 threads
8.3s
17.6x
32 threads
5.1s
28.5x
Scaling efficiency (32 threads): 89%

Efficiency = (speedup / threads) x 100%. Values over 100% indicate super-linear scaling due to cache effects.

Linear Scaling with Portfolio Size

8 threads x 100K scenarios x 252 timesteps

Greeks Computation Time by Number of Trades

10 trades
1.08s
108.0ms/trade
100 trades
2.16s
21.6ms/trade
1,000 trades
15.69s
15.7ms/trade
Cost per trade decreases with scale: 10 trades: 108ms/trade, 1000 trades: 16ms/trade

Per-trade overhead decreases as batch size increases due to amortized kernel setup costs.

Linear Scaling with Monte Carlo Paths

8 threads x 1000 trades x 252 timesteps

Greeks Time & Memory by Number of Scenarios

10K scenarios
1.48s
19 MB
100K scenarios
15.69s
192 MB
500K scenarios
79.91s
961 MB
Memory scales linearly: ~1.9 MB per 1K scenarios

Memory scales only with scenarios (not trades or threads). At 500K scenarios = 961 MB.

Memory Depends Only on Scenarios

~1.9 MB per 1K scenarios, independent of trades or threads

Thread Scaling
192 MB
constant (1-32 threads)
Trades Scaling
192 MB
constant (10-1000 trades)
Scenarios Scaling
10K 19 MB
100K 192 MB
500K 961 MB

Memory usage is dominated by the scenario count. Each scenario requires ~1.9 MB of storage for paths and intermediate results.

Greeks Time: Trades x Scenarios

8 threads, 252 timesteps, Delta + Rho + Vega

Scenarios 10 Trades 100 Trades 1000 Trades
10K 0.103s 0.199s 1.478s
100K 1.077s 2.164s 15.694s
500K 5.204s 10.742s 79.913s

Understanding the Matrix: This matrix shows Greeks computation time for all combinations of trades and scenarios.

  • Moving right (more trades): Time increases ~10x per 10x trades increase
  • Moving down (more scenarios): Time increases ~10x per 10x scenarios increase
  • Production sweet spot: 1000 trades x 100K scenarios = 15.7 seconds for full Greeks

Why AADC C++ Scales So Well

Thread Scaling

Near-linear scaling due to native thread pool with minimal synchronization overhead

  • OpenMP-style parallelization across scenarios
  • Lock-free batch processing
  • SIMD vectorization (AVX2/AVX512) within each thread
  • Minimal memory contention

Trades Scaling

Linear scaling - each trade is independent and processed sequentially

  • Outer loop over trades maintains cache locality
  • Fixed kernel overhead per trade is negligible
  • Memory usage scales linearly with trades

Scenarios Scaling

Linear scaling - scenarios are parallelized across threads

  • Scenarios distributed evenly across threads
  • No inter-scenario dependencies
  • Memory bandwidth becomes bottleneck at very high counts

Complete Thread Scaling Results

1000 trades x 100K scenarios x 252 timesteps

AADC C++ Thread Scaling (Memory: 192 MB constant)
Threads Price Only (s) Greeks (s) Speedup Efficiency Memory
1 76.01 145.09 1.0x 100% 192 MB
4 22.22 30.96 4.7x 117% 192 MB
8 11.18 15.69 9.2x 116% 192 MB
16 6.02 8.25 17.6x 110% 192 MB
32 3.17 5.09 28.5x 89% 192 MB

All tests run on multi-core CPU with AADC C++ v2.1.0/2.3.0. Greeks include Delta, Rho, and Vega.

Ready to Scale Your Greeks Computation?

AADC C++ delivers predictable, linear scaling for production workloads of any size.