Van der Pol Oscillator Benchmark

Measures CPU performance by solving the stiff Van der Pol ODE with a 4th-order Runge-Kutta method over 1 million steps. RK4 performs 4 force evaluations per step — 4× the arithmetic of a plain Euler solver. Lower time is better.

...
Your Result
ms

View TOP 500 Leaderboard

About this benchmark

The Van der Pol oscillator, named after Balthasar van der Pol who studied it in the 1920s while analyzing vacuum-tube circuits, is a canonical nonlinear oscillator with a self-sustaining limit cycle. Unlike a simple harmonic oscillator, it exhibits nonlinear damping: for small amplitudes the damping is negative (energy is added), and for large amplitudes it is positive (energy is dissipated). This drives trajectories toward a stable oscillating state regardless of initial conditions.

The equation x'' − μ·(1−x²)·x' + x = 0 becomes stiff for large μ — the solution alternates between slow drift phases and rapid spike-like transitions that require small timesteps to capture accurately. A plain Euler solver would need an impractically tiny dt to remain stable, which is why this benchmark uses the 4th-order Runge-Kutta method (RK4). RK4 evaluates the right-hand side four times per step with a weighted average, achieving 4th-order accuracy and tolerating much larger timesteps.

The benchmark runs 1 000 000 RK4 steps with μ = 5, x₀ = 2, v₀ = 0, dt = 0.01. Each step performs four right-hand side evaluations involving roughly ten floating-point operations each, for approximately 40 million operations total. The tight loop with no memory traffic beyond a handful of registers tests the CPU's ability to sustain throughput in dependent floating-point chains. This makes it a more demanding benchmark than the single-Euler-step variants, penalizing processors with poor pipeline depth or branch-prediction under data-dependent conditions.