⚡ API Latency Benchmark

Testing the Calculate API's performance for interactive slider experiences.
Target: < 20ms for smooth 60 FPS animations.

Why < 20ms Matters

Latency User Perception Animation Quality
< 16ms Imperceptible 60 FPS smooth animation ✓
< 20ms Instant Charts animate fluidly as slider moves ✓
< 50ms Immediate Responsive, but slight lag on fast dragging
50-100ms Noticeable Perceptible delay, animation stutters
> 100ms Sluggish User stops trusting the interface

Reference: For a slider-driven calculator where charts update on every drag, 60 FPS requires < 16.67ms total frame budget. Our API must return in < 20ms to leave room for rendering.

📈 Benchmark Results

Min Latency
Average
P95
Max Latency

📊 Simulate Endpoint (by Tier)

Tier 1 (age + income)
Tier 2 (+ state, filing)
Tier 3 (+ accounts)
Tier 4 (+ events)
Tier 5 (+ positions)

🔧 Solver Endpoints

Solve: retirement_age
Solve: savings_rate
Solve: target_wealth

🔥 Edge Cases

10+ accounts
300 positions (direct indexing)
50-year simulation
10+ life events

🧭 Guidance API

Context (with calc results)

Note: Guidance API is called on commit (debounced), not on every slider move. Target is < 50ms.

📜 API Log

[Ready] Click "Run All Benchmarks" to start