Benchmarks¶
Generation and rating times for every genre, measured on one machine. Times are comparable within a run. Operation counts are deterministic and the same on every machine.
Runs¶
Genres |
Code |
Date |
|---|---|---|
fillomino, hashi, hitori, kakurasu |
pencil-puzzles 0.2.0 |
2026-11-06 |
kakuro, nurikabe |
pencil-puzzles 0.3.0 |
2026-11-08 |
sudoku |
pencil-puzzles after 0.3.1 |
2026-11-09 |
All runs used the same setup:
Machine: Intel Core i7-8700K, Windows 11 Pro, otherwise idle
Rust: rustc 1.99.1, release profile
WebAssembly: Node.js 24.17.0
Native¶
cargo run --release -p pencil-puzzles --example benchmark -- <genre> 20
Each genre’s sizes are listed in
benchmark.rs. For
each size and level, the benchmark generates seeds 0-19 with the
command-line tool’s limits (10,000 attempts and 100,000,000 operations),
then rates every corpus puzzle. <genre>.csv has one row per size and level:
Column |
Meaning |
|---|---|
|
Size and requested level ( |
|
Seeds that produced a puzzle |
|
Generation time over all seeds, failures as infinite |
|
Attempts per puzzle produced |
|
Operations per seed, including failures |
|
Levels of the puzzles produced |
The rows after corpus,level,rating_ms give the time to rate each corpus
puzzle.
WebAssembly¶
node web/build.mjs
node web/benchmark.mjs <genre> <default size> 20
This times the web app’s engine with its limits (10,000 attempts and 100,000,000 operations). Each genre page gives the WebAssembly median divided by the native median, as a geometric mean over the levels where both found all 20 puzzles and the native median is at least 10 ms.