Scientific Computing
GitHub RepositoryReaction-Diffusion Benchmark
The same simulation, two Python backends, and a careful measurement of speed alongside numerical consistency.
Context: Scientific computing, numerical simulation, and Python performance benchmarking
Period: 2026
Summary
The benchmark runs the same two-dimensional FitzHugh-Nagumo reaction-diffusion model through vectorized NumPy and parallel Numba implementations. Identical initial states, equations, iteration counts, and output metrics place runtime gains beside numerical error and statistical significance.
From identical inputs to a defensible performance comparison
Initial state
Both backends receive the same grid and parameters
NumPy
The vectorized reference runs the simulation
Numba
The compiled parallel backend solves the same equations
Verification
Runtime, numerical error, and significance are measured
Reports
Tables and plots make the results comparable
What the system handled
Benchmarks 2D FitzHugh-Nagumo reaction-diffusion simulation.
Compares vectorized NumPy with parallel Numba using the same equations, initial state, iteration count, and metrics.
Includes periodic boundary conditions and four-neighbor diffusion.
Generates CSV outputs, plots, runtime metrics, numerical-error metrics, and statistical comparisons.
Measured paired benchmark
Ten paired samples of 300 iterations per grid, comparing Numba with the NumPy reference under identical simulation conditions.
Numba speedup
8.50×
NumPy on 64 × 64
Numba speedup
3.77×
NumPy on 128 × 128
Numba speedup
2.44×
NumPy on 256 × 256
Paired t-test
< 0.001p-value
All tested grid sizes
Maximum absolute error
2.3e-6–2.6e-6
Numba compared with NumPy
Technology
Stack
Areas
Benchmark explorer
Precomputed benchmark results
Numba compared with the NumPy reference
Select a grid size to inspect mean runtime and measured speedup while keeping numerical consistency visible beside performance.
faster than the NumPy reference
- Maximum absolute error
- 2.56e-6
- Paired t-test
- p = 7.50e-4
- Samples × iterations
- 10 × 300
Source: committed benchmark CSV files, using 10 paired samples of 300 iterations per grid. This explorer presents the precomputed results; benchmark execution remains in the repository workflow.
Inspect the source CSV files on GitHubConclusions
- Numba reduced runtime at every tested grid size, with the largest measured gain on the 64 × 64 simulation.
- The decreasing speedup at larger grids shows why one headline number is insufficient; performance changes with workload size and execution overhead.
- Keeping numerical error beside runtime confirmed that the faster implementation remained close to the NumPy reference throughout the measured speedup.
Want to inspect the implementation?
The repository contains the source, setup notes, and development history.
Keep exploring