ERPG Dice / Benchmarks

Dice Core, under the microscope.

Compare features and complete roll throughput on the same expressions. Every rate comes from a repeatable test with stated limits.

5equivalent Core speed scenarios
4RPG system APIs in Dice Core

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

More than a number on a chart.

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.

Dice Core

Rule engines, side by side

Explore the Core API ↗
CapabilityDice Core v3.7.1RPG Dice Roller ↗RANDSUM ↗Dice Roller Parser ↗
NotationAdvanced expressions and four system APIsBroad dice notationRDN Level 4; 19 modifiersRoll20-style notation
Random sourceCrypto by default; seed and plan-bound replayMath.random default; configurable crypto or seeded MTCustom randomFn for seeded or crypto RNGMath.random default; injectable random function
Result contractDice, groups, event journal and replay metadataRoll results and roll historyInitial and final rolls with descriptionsResult 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

Same rules. Measured throughput.

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.

1d20

Single d20

7 samples, iterations calibrated by package
  1. @erpg/dicecore9,180 rolls / sample27,853 ops/s
  2. @dice-roller/rpg-dice-roller23,642 rolls / sample154,642 ops/s
  3. @randsum/roller27,926 rolls / sample108,360 ops/s
  4. dice-roller-parser84,289 rolls / sample317,270 ops/s
2d6+3

Two dice and a modifier

7 samples, iterations calibrated by package
  1. @erpg/dicecore7,637 rolls / sample25,175 ops/s
  2. @dice-roller/rpg-dice-roller20,275 rolls / sample76,302 ops/s
  3. @randsum/roller8,811 rolls / sample41,482 ops/s
  4. dice-roller-parser35,650 rolls / sample200,771 ops/s
4d6kh3

Keep three highest of four

7 samples, iterations calibrated by package
  1. @erpg/dicecore6,375 rolls / sample20,177 ops/s
  2. @dice-roller/rpg-dice-roller28,711 rolls / sample110,317 ops/s
  3. @randsum/roller11,530 rolls / sample32,240 ops/s
  4. dice-roller-parser48,629 rolls / sample196,802 ops/s

RANDSUM uses its equivalent 4d6L syntax to drop the lowest die.

10d6

Ten-die pool

7 samples, iterations calibrated by package
  1. @erpg/dicecore6,401 rolls / sample23,561 ops/s
  2. @dice-roller/rpg-dice-roller53,606 rolls / sample162,339 ops/s
  3. @randsum/roller26,157 rolls / sample104,461 ops/s
  4. dice-roller-parser64,267 rolls / sample246,363 ops/s
3d8+2d6

Mixed die sizes

7 samples, iterations calibrated by package
  1. @erpg/dicecore7,363 rolls / sample25,300 ops/s
  2. @dice-roller/rpg-dice-roller25,487 rolls / sample82,256 ops/s
  3. @randsum/roller14,164 rolls / sample61,013 ops/s
  4. dice-roller-parser28,219 rolls / sample148,960 ops/s

Measured September 24, 2026 · AMD Ryzen 5 5500 · Node.js v24.18.0 · win32 10.0.26200 (x64)

03 / Method

A test you can repeat.

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.

Run it yourself

cd scripts/benchmarks
npm ci
npm run bench

The command rewrites results.json. It uses no network, GPU or browser while timing the rolls.

Download raw data ↗

04 / Dice Core

Two other Core workflows.

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.

28,094 ops/s

Precompiled plan

Compile 4d6kh3 outside the timed loop; roll the plan with the default random source.

96,121 ops/s

Fixed seed, xoshiro128ss

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

What throughput cannot tell you.

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.

Measured

Repeated public roll API calls in Node.js for five bounded, common expressions.

Outside this test

Browser behavior, package load, memory, large or explosive rolls, system-specific mechanics and Dice View 3D frames.

Different random sources

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

Versions and API references

Feature documentation

The full method and implementation are in scripts/benchmarks/README.md and benchmark.mjs in this site’s repository.