Predator-Prey Benchmark

Measures CPU performance by integrating the classic two-species Lotka-Volterra predator-prey ODE system over 5 million timesteps. Lower time is better.

...
Your Result
ms

View TOP 500 Leaderboard

About this benchmark

The Lotka-Volterra predator-prey model, developed independently by Alfred Lotka (1925) and Vito Volterra (1926), describes the cyclic dynamics between two interacting species. Prey grow freely until predators multiply in response; growing predators deplete prey; scarce prey starve predators; with fewer predators, prey recover — and the cycle repeats indefinitely. In the phase portrait this cycle appears as a closed orbit around the equilibrium point (α/β, γ/δ).

The system is dx/dt = α·x − β·x·y for prey population x and dy/dt = δ·x·y − γ·y for predators y. The four parameters control birth and death rates: α is prey birth rate, β is prey death rate from predation, δ is predator birth rate from predation, and γ is predator natural death rate. The x·y cross-term is nonlinear and represents encounters between species, creating a data dependency between the two variables that prevents independent vectorization.

This benchmark integrates the coupled Lotka-Volterra system over 5 million Euler timesteps. Each step computes two coupled updates involving four multiplications and four additions — more arithmetic per iteration than a single-variable ODE. The coupled x·y products stress the CPU's scalar floating-point pipeline with mild inter-variable dependencies, making this a representative test that goes beyond trivial register-resident loops. A lower elapsed time indicates better single-thread CPU throughput.