1d20Single d20
- @erpg/dicecore9,180 rolls / sample27,853 ops/s
- @dice-roller/rpg-dice-roller23,642 rolls / sample154,642 ops/s
- @randsum/roller27,926 rolls / sample108,360 ops/s
- dice-roller-parser84,289 rolls / sample317,270 ops/s
ERPG Dice / Benchmarks
Compare features and complete roll throughput on the same expressions. Every rate comes from a repeatable test with stated limits.
In the five simple speed scenarios, the comparison libraries were faster. The figure above is one measured median, not a claim to lead the market. Full results and limitations follow.
01 / Features
Dice Core connects expressive notation to system-specific results and a structured event journal. This table compares documented APIs without treating different output contracts as equivalent.
| Capability | Dice Core v3.7.1 | RPG Dice Roller ↗ | RANDSUM ↗ | Dice Roller Parser ↗ |
|---|---|---|---|---|
| Notation | Advanced expressions and four system APIs | Broad dice notation | RDN Level 4; 19 modifiers | Roll20-style notation |
| Random source | Crypto by default; seed and plan-bound replay | Math.random default; configurable crypto or seeded MT | Custom randomFn for seeded or crypto RNG | Math.random default; injectable random function |
| Result contract | Dice, groups, event journal and replay metadata | Roll results and roll history | Initial and final rolls with descriptions | Result object and separate parsing API |
The Core column describes v3.7.1. Competitor descriptions come from their public API documentation and may evolve independently of the pinned benchmark versions.
02 / Dice Core · Speed
Each operation calls a public roll API with the same expression and reads the total. Internal caches stay enabled. Higher is faster; bars share a scale within each scenario.
1d202d6+34d6kh3RANDSUM uses its equivalent 4d6L syntax to drop the lowest die.
10d63d8+2d6Measured September 24, 2026 · AMD Ryzen 5 5500 · Node.js v24.18.0 · win32 10.0.26200 (x64)
03 / Method
We pinned package versions and tested only notation understood by every engine. Each scenario was warmed up, checked for valid output and measured seven times. Iterations were calibrated per package to roughly 250 ms per sample. The median becomes the published rate.
cd scripts/benchmarks
npm ci
npm run benchThe command rewrites results.json. It uses no network, GPU or browser while timing the rolls.
Download raw data ↗04 / Dice Core
These separate experiments illustrate how compilation and random-source choices affect the same 4d6kh3 roll. They are not part of the market ranking because they change the operation or randomness.
Compile 4d6kh3 outside the timed loop; roll the plan with the default random source.
Uses the cached expression and avoids a fresh crypto seed. The same seed is reused, so this is a repeated deterministic result, not independent random rolls.
05 / Reading the numbers
A full Dice Core result includes structured dice, roll groups, event history and replay metadata. The comparison packages return different object shapes. Dice Core caches repeated notation after warmup. This test uses every package’s default API and reads only its total; it does not normalize output depth, cache behavior, features or random-source costs.
Repeated public roll API calls in Node.js for five bounded, common expressions.
Browser behavior, package load, memory, large or explosive rolls, system-specific mechanics and Dice View 3D frames.
Dice Core uses crypto.getRandomValues by default. Each comparison package uses its own default. That affects timing.
Dice Core sustained tens of thousands of complete rolls per second here, while the three comparison libraries led these basic throughput tests. Choose a dice engine by the rules, output and integration your game needs.
06 / Sources
The full method and implementation are in scripts/benchmarks/README.md and benchmark.mjs in this site’s repository.
IN USE
Compare the numbers, then explore where the libraries appear in RPG experiences.