diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 00000000..14f4a54a --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,6 @@ +# Built for this machine only: every binary of this tree (live rechner and benches) runs on this +# computer, so the compiler may use its instructions (POPCNT, LZCNT, BMI2, AVX2). Measured 8 % faster, +# decisions bit-identical (messung_perf/BERICHT.md). A binary built here will NOT run on a CPU +# without these instructions: for another machine remove this file (or set RUSTFLAGS=""). +[build] +rustflags = ["-C", "target-cpu=native"] diff --git a/Cargo.toml b/Cargo.toml index c650c10d..30569afd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,3 +8,12 @@ description = "Pure, functional poker decision core. JSON lines in, JSON lines o [profile.test] opt-level = 2 + +# Perf track (messung_perf/BERICHT.md): for the measurement binaries (`cargo build --profile mess`, +# output in target/mess/). lto + one codegen unit measured bit-identical and 3 % faster; kept out of +# `release` so `cargo test --release` does not link every test binary with fat LTO. panic stays +# "unwind": main.rs and audit.rs rely on catch_unwind. +[profile.mess] +inherits = "release" +lto = "fat" +codegen-units = 1 diff --git a/messung_perf/.gitignore b/messung_perf/.gitignore new file mode 100644 index 00000000..018cfcc4 --- /dev/null +++ b/messung_perf/.gitignore @@ -0,0 +1,8 @@ +bin/ +prof*.txt +sprof*.txt +!*.report.txt +*.out +!test.out +*.dump +*.sorted diff --git a/messung_perf/BERICHT.md b/messung_perf/BERICHT.md new file mode 100644 index 00000000..1120882b --- /dev/null +++ b/messung_perf/BERICHT.md @@ -0,0 +1,114 @@ +# Perf-Track: Messprogramme und Rechner schneller, bit-identisch + +**Kurz (alles bit-identisch, gleicher Seed -> gleiche Decision, Hand fuer Hand):** + +| Pfad | vorher -> nachher | Faktor | +|---|---|---| +| Engine-LBR Haende 0..20 (49 212 Entscheidungen) | 1157 s -> 22.2 s Wand | 52x | +| Leiter ab_zelle reg/maniac/wert-sizer | 54.3 -> 16.4 CPU-s (ohne native) | 3.3x | +| River-Solver-LBR Arm A (solver-ueberall) | 188.6 -> 7.05 CPU-s | 27x | +| Turn-Solver-Arm AB (zusaetzlich zu den obigen) | 286.7 -> 230.5 CPU-s | 1.24x | +| Flop-Solver-Arm ABC (zusaetzlich) | 61.9 -> 43.8 CPU-s, native -5 % mehr | 1.41x / 1.48x | +| Live Flop (Budget 1800 ms) | 115 -> 200 Iterationen p50, Rueckfaelle 17 -> 0 | | +| Live River p50 / Turn p50 | 976 -> 804 ms / 1710 -> 1583 ms | 1.21x / 1.08x | + +Alle Zeiten wurden auf einer belasteten Maschine gemessen (Prioritaet Idle, 1 Thread), vorher und +nachher abwechselnd. "Bit-identisch" heisst: ein Fingerabdruck ueber das volle `Debug` jeder Decision +(FNV, Summe ueber alle Aufrufe) ist gleich, bzw. die Ausgabedateien sind byte-gleich. +Werkzeug dazu: `src/bin/perf_probe` (`perf_probe lbr [seed]`, `perf_probe zelle `; +`PERF_DUMP=` schreibt jede Antwort, `PERF_PROFIL=` schaltet den eingebauten Sampler ein, +`werkzeuge/perf_symbole.py` loest die Proben auf). + +## Hebel (Engine-LBR, 6 Haende, Seed 7, 13 119 Entscheidungen, Fingerabdruck 9754b5c8b2a54d12) + +| Hebel | Wand-s vorher -> nachher | Faktor | kumuliert | bit-identisch | +|---|---|---|---|---| +| Direkter 7-Karten-Bewerter (Farb-Lanes, `showdown::best_standard`) | 250 -> 95.5 | 2.6x | 2.6x | ja (alle 5/6/7-Karten-Haende erschoepfend geprueft) | +| Range-Filter-Cache (pro Spec/Board, Urteil pro Kartenpaar gemerkt) | 95.5 -> 40.9 | 2.3x | 6.1x | ja | +| `distinct` als Bitmaske, `deal_combo` Restmaske | 40.9 -> 24.5 | 1.64x | 10.2x | ja | +| `Pool` mit Positionstabelle, kein Vec pro Versuch, Board-Lanes einmal | 24.5 -> 12.2 | 1.9x | 20.5x | ja | +| Combos erst filtern, dann allozieren; Verfuegbarkeit ueber `at` | (12 H.) 28.6 -> 20.8 | 1.37x | ~28x | ja | +| `straight_draw`: Fenster einmal, Hold'em-Abkuerzung | Leiter 4.9/5.1 -> 3.7/3.8 CPU-s | ~1.33x | | ja (alle Rangmuster erschoepfend) | + +Langer Referenzlauf LBR Haende 0..20, Seed 7 (49 212 Entscheidungen, Fingerabdruck 6c0a9a7645372cec): +**1157 s -> 34.7 s Wand / 27.2 s CPU = 33x**, identisch. +Endstand (alle Algorithmus-Hebel, ohne Compiler-Hebel, `pokerbench-perf-probe8`): **1157 s -> 29.2 s Wand / 27.3 s CPU = 40x**, Werte und +Fingerabdruck identisch (`p8_20.txt`). + +Leiter `ab_zelle` (Zeilen reg, maniac, wert-sizer; 100/200 Deals; 1 Thread): **54.27 -> 20.84 CPU-s = 2.6x**, +Dateien byte-gleich. +Endstand (`pokerbench-perf-zelle8`): **54.27 -> 16.44 CPU-s = 3.3x**, alle drei Dateien byte-gleich mit `zelle0/`. Rest dort: River-Subgame-CFR (`cfr::solve`, 12 000 Iterationen) ~36 %. + +River-Solver-LBR (Stand `solver-ueberall-44ecc1` 3b5cee5, Arm A: SOLVER_RIVER=1, TURN_SPIEL=grund), +4 Haende, Budgets fuer die Messung auf unendlich gestellt (sonst nicht reproduzierbar): +**207.7 -> 9.8 s Wand (188.6 -> 8.2 s CPU) = 21x**, identisch (63a7e9b3bd5b360b, 8299 Antworten 0 Abweichungen). +Patch: `solver-ueberall-perf.patch` (dieselben Hebel, `git apply` auf 3b5cee5). + +## Specs + +`cargo test --release -j 4` (2 Test-Threads, Idle): 1240 gruen, 10 rot, 19 ignoriert. Die 10 roten +(cfr_multi, generated_charts_plausibility, generated_charts_reproduce, pipeline_bluff, +preflop_multi_advice, preflop_plo4: Preflop-Charts) sind auf HEAD 5d4f939 ohne diese Aenderungen +genauso rot (sauberer Worktree, gleiche Tests) - nicht von diesem Track. Zusaetzlich +`the_direct_evaluator_equals_enumeration_everywhere` (#[ignore], alle 6- und 7-Karten-Haende) gruen. + +## Compiler-Hebel (12 Haende LBR, CPU-s, Mittel aus 3, nach den Algorithmus-Hebeln) + +| Hebel | CPU-s | Gewinn | bit-identisch | +|---|---|---|---| +| Basis (release wie bisher) | 17.77 | - | - | +| lto = "fat" | 17.52 | 1.4 % | ja | +| codegen-units = 1 | 17.49 | 1.6 % | ja | +| panic = "abort" | 17.67 | 0.6 % | ja | +| target-cpu=native (POPCNT/LZCNT/BMI2) | 16.34 | 8 % | ja | +| alles zusammen | 15.88 | 10.6 % (1.12x) | ja | + +Eingebaut: `target-cpu=native` in `.cargo/config.toml` (alle Binaries dieses Baums laufen nur auf +diesem Rechner); `lto="fat"` + `codegen-units=1` als `[profile.mess]` fuer Messbinaries +(`cargo build --profile mess`), nicht in `release`, sonst linkt `cargo test --release` 144 +Testbinaries mit fat LTO. `panic="abort"` nicht: main.rs und audit.rs brauchen `catch_unwind`. + +## Solver-CFR (`cfr/turn_river_game.rs`, Stand solver-ueberall), bit-identisch + +Hebel: `walk` ohne Allokation pro Knoten (Puffer-Vorrat, Inhalt nie vor dem Schreiben gelesen), +`show`/`show_eq` schreiben in Vorratspuffer (vorher fuellten ihre Rueckgabe-Vecs den Vorrat mit zu kleinen +Puffern -> `grow` 10 %), `matched` fuer 2/3/4 Aktionen fest ausgerollt (`Iterator::sum` faltet ab -0.0, +-0.0 + x == x bitgenau). Verworfen, weil gemessen ohne Gewinn: Null-Bloecke in `show_eq` ueberspringen +(exakt, aber Reach ist kaum blockweise 0), vier Zeilen auf einmal (langsamer, 70.7 statt 45.4 s: +Vektorisierung bricht). Festes Iterationsbudget (Wanduhr-Budgets auf unendlich), paarweise parallel gemessen: + +| Arm | vorher -> nachher CPU-s | Faktor | bit-identisch | +|---|---|---|---| +| A River (SOLVER_RIVER, Haende 0..4) | 7.59 -> 7.05 | 1.08x | ja, 63a7e9b3bd5b360b (8299 Aufrufe) | +| AB Turn (+SOLVER_TURN, Haende 2..6) | 286.7 -> 230.5 | 1.24x | ja, 97e5284c0c7d7977, Dump 8196 Zeilen byte-gleich | +| ABC Flop (+SOLVER_FLOP, erste 80 Aufrufe) | 61.9 -> 43.8 | 1.41x | ja, 159b95175f3d8384, Dump byte-gleich | + +Dieselben CFR-Hebel auf main (`src/cfr/turn_river_game.rs`, Turn-Spiel mit TURN_SPIEL=grund, LBR Haende 0..6): +Fingerabdruck 70ed8d3093c78a44 (11 945 Aufrufe) gleich, Dump byte-gleich, Turn-Loesung 864 -> 692 ms. +target-cpu=native zusaetzlich (paarweise, identisch): LBR 0..20 24.0 -> 21.4 CPU-s (-11 %), Flop-Arm 33.3 -> 31.8 (-5 %). + +Gesamt gegenueber 3b5cee5 ohne jeden Hebel: Arm A 188.6 -> ~7.1 CPU-s (~27x). +Patch fuer solver-ueberall (alles, ohne Budget-Hack, Probe und Messhaken): `solver-ueberall-perf.patch`, +`git apply --check` sauber auf 59a9fed. + +## Live: Entscheidungszeit und Iterationen im Budget + +Leiterspiel (Zeile reg, 150 Deals, eine Engine-Abfrage pro echter Entscheidung), alle drei Solver an, +Budgets wie live (River 1500, Turn 1700, Flop 1800 ms), vorher/nachher gleichzeitig unter derselben Last +(Maschine voll belegt, Idle-Prioritaet: absolute ms sind ueberhoeht, der Vergleich gilt): + +| Pfad | n vorher/nachher | p50 ms vorher -> nachher | p99 ms vorher -> nachher | Iterationen p50 (min) | +|---|---|---|---|---| +| Flop-Solver | 150 / 164 | 1816 -> 1665 | 1839 -> 1827 | 115 (60) -> 200 (130) | +| Flop, auf Heuristik zurueckgefallen (< 60 It.) | 17 / 0 | | | | +| Turn-Solver | 108 / 114 | 1710 -> 1583 | 1727 -> 1726 | (nicht im Grund) | +| River-Solver | 65 / 71 | 976 -> 804 | 1217 -> 1046 | 600 -> 600 (Deckel) | +| Heuristik (Engine-LBR, erste Abfrage je Zustand) | | Flop 1.8, Turn 1.8, River 1.4 (Mittel ueber alle Aufrufe vorher 23.5, nachher 0.59) | Flop 2.8, Turn 3.2, River 2.7 | | + +Turn und Flop laufen live an die Budgetgrenze: schneller heisst dort mehr Iterationen bzw. kein Rueckfall auf +die Heuristik, nicht kuerzer. Live ist deshalb nicht bit-gleich (mit festem Iterationsbudget schon). + +## Offen + +- Leiter: `cfr::iterate`/`terminal_value` (River-Subgame, ~36 % der Leiter) mehrere Zeilen gleichzeitig. +- Turn/Flop: weitere 1.2-1.5x waeren nur mit anderer Rechenreihenfolge drin (nicht bit-gleich, nicht gebaut). diff --git a/messung_perf/a4_solver2.time b/messung_perf/a4_solver2.time new file mode 100644 index 00000000..666282ec --- /dev/null +++ b/messung_perf/a4_solver2.time @@ -0,0 +1 @@ +7.98 s cpu 7.59 s exit 0 diff --git a/messung_perf/a4_solver2.txt b/messung_perf/a4_solver2.txt new file mode 100644 index 00000000..127224e0 --- /dev/null +++ b/messung_perf/a4_solver2.txt @@ -0,0 +1,5 @@ +0 2.5 +1 2.5 +2 2.5 +3 2.5 +fingerprint 63a7e9b3bd5b360b calls 8299 diff --git a/messung_perf/a4_solver2.txt.err b/messung_perf/a4_solver2.txt.err new file mode 100644 index 00000000..f2dd1454 --- /dev/null +++ b/messung_perf/a4_solver2.txt.err @@ -0,0 +1,7 @@ +6.93 s, 8299 engine calls, 0.835 ms/call +zeit board=3 heuristik alle: n 7642 p50 0.61 ms p99 0.92 ms max 2.56 ms +zeit board=3 heuristik live: n 15 p50 1.91 ms p99 2.56 ms max 2.56 ms +zeit board=4 heuristik alle: n 499 p50 0.57 ms p99 1.02 ms max 2.16 ms +zeit board=4 heuristik live: n 1 p50 0.54 ms p99 0.54 ms max 0.54 ms +zeit board=4 turn-solver alle: n 158 p50 0.65 ms p99 1.17 ms max 1143.54 ms +zeit board=4 turn-solver live: n 2 p50 1143.54 ms p99 1143.54 ms max 1143.54 ms diff --git a/messung_perf/a4_solver7.time b/messung_perf/a4_solver7.time new file mode 100644 index 00000000..22b3946b --- /dev/null +++ b/messung_perf/a4_solver7.time @@ -0,0 +1 @@ +7.45 s cpu 7.05 s exit 0 diff --git a/messung_perf/a4_solver7.txt b/messung_perf/a4_solver7.txt new file mode 100644 index 00000000..127224e0 --- /dev/null +++ b/messung_perf/a4_solver7.txt @@ -0,0 +1,5 @@ +0 2.5 +1 2.5 +2 2.5 +3 2.5 +fingerprint 63a7e9b3bd5b360b calls 8299 diff --git a/messung_perf/a4_solver7.txt.err b/messung_perf/a4_solver7.txt.err new file mode 100644 index 00000000..51e7d1f4 --- /dev/null +++ b/messung_perf/a4_solver7.txt.err @@ -0,0 +1,7 @@ +6.42 s, 8299 engine calls, 0.773 ms/call +zeit board=3 heuristik alle: n 7642 p50 0.60 ms p99 1.02 ms max 3.12 ms +zeit board=3 heuristik live: n 15 p50 1.93 ms p99 2.51 ms max 2.51 ms +zeit board=4 heuristik alle: n 499 p50 0.49 ms p99 0.86 ms max 1.04 ms +zeit board=4 heuristik live: n 1 p50 0.55 ms p99 0.55 ms max 0.55 ms +zeit board=4 turn-solver alle: n 158 p50 0.64 ms p99 0.92 ms max 855.61 ms +zeit board=4 turn-solver live: n 2 p50 855.61 ms p99 855.61 ms max 855.61 ms diff --git a/messung_perf/ab6_solver2.time b/messung_perf/ab6_solver2.time new file mode 100644 index 00000000..18493b31 --- /dev/null +++ b/messung_perf/ab6_solver2.time @@ -0,0 +1 @@ +299.19 s cpu 286.67 s exit 0 diff --git a/messung_perf/ab6_solver2.txt b/messung_perf/ab6_solver2.txt new file mode 100644 index 00000000..8b8c343f --- /dev/null +++ b/messung_perf/ab6_solver2.txt @@ -0,0 +1,5 @@ +2 2.5 +3 2.5 +4 2.5 +5 2.5 +fingerprint 97e5284c0c7d7977 calls 8196 diff --git a/messung_perf/ab6_solver2.txt.err b/messung_perf/ab6_solver2.txt.err new file mode 100644 index 00000000..1b3c4cc5 --- /dev/null +++ b/messung_perf/ab6_solver2.txt.err @@ -0,0 +1,7 @@ +298.16 s, 8196 engine calls, 36.378 ms/call +zeit board=3 heuristik alle: n 7539 p50 0.55 ms p99 0.95 ms max 2.47 ms +zeit board=3 heuristik live: n 15 p50 1.50 ms p99 2.47 ms max 2.47 ms +zeit board=4 heuristik alle: n 219 p50 0.34 ms p99 0.47 ms max 0.48 ms +zeit board=4 heuristik live: n 1 p50 0.41 ms p99 0.41 ms max 0.41 ms +zeit board=4 turn-solver alle: n 438 p50 886.11 ms p99 1429.58 ms max 2315.43 ms +zeit board=4 turn-solver live: n 2 p50 1167.30 ms p99 1167.30 ms max 1167.30 ms diff --git a/messung_perf/ab6_solver7.time b/messung_perf/ab6_solver7.time new file mode 100644 index 00000000..0fc7e45b --- /dev/null +++ b/messung_perf/ab6_solver7.time @@ -0,0 +1 @@ +242.20 s cpu 230.52 s exit 0 diff --git a/messung_perf/ab6_solver7.txt b/messung_perf/ab6_solver7.txt new file mode 100644 index 00000000..8b8c343f --- /dev/null +++ b/messung_perf/ab6_solver7.txt @@ -0,0 +1,5 @@ +2 2.5 +3 2.5 +4 2.5 +5 2.5 +fingerprint 97e5284c0c7d7977 calls 8196 diff --git a/messung_perf/ab6_solver7.txt.err b/messung_perf/ab6_solver7.txt.err new file mode 100644 index 00000000..8d87cabc --- /dev/null +++ b/messung_perf/ab6_solver7.txt.err @@ -0,0 +1,7 @@ +241.16 s, 8196 engine calls, 29.425 ms/call +zeit board=3 heuristik alle: n 7539 p50 0.55 ms p99 0.89 ms max 2.34 ms +zeit board=3 heuristik live: n 15 p50 1.38 ms p99 2.34 ms max 2.34 ms +zeit board=4 heuristik alle: n 219 p50 0.35 ms p99 0.42 ms max 0.63 ms +zeit board=4 heuristik live: n 1 p50 0.63 ms p99 0.63 ms max 0.63 ms +zeit board=4 turn-solver alle: n 438 p50 749.19 ms p99 1133.64 ms max 1780.44 ms +zeit board=4 turn-solver live: n 2 p50 829.14 ms p99 829.14 ms max 829.14 ms diff --git a/messung_perf/ab_solver2.time b/messung_perf/ab_solver2.time new file mode 100644 index 00000000..8516d8c0 --- /dev/null +++ b/messung_perf/ab_solver2.time @@ -0,0 +1 @@ +3.35 s cpu 3.19 s exit 0 diff --git a/messung_perf/ab_solver2.txt b/messung_perf/ab_solver2.txt new file mode 100644 index 00000000..7ebd7cde --- /dev/null +++ b/messung_perf/ab_solver2.txt @@ -0,0 +1,3 @@ +0 2.5 +1 2.5 +fingerprint 8e68d9085dfa844a calls 3749 diff --git a/messung_perf/ab_solver2.txt.err b/messung_perf/ab_solver2.txt.err new file mode 100644 index 00000000..dd8c5d06 --- /dev/null +++ b/messung_perf/ab_solver2.txt.err @@ -0,0 +1,3 @@ +2.35 s, 3749 engine calls, 0.628 ms/call +zeit board=3 heuristik alle: n 3749 p50 0.62 ms p99 0.91 ms max 2.48 ms +zeit board=3 heuristik live: n 7 p50 1.99 ms p99 2.48 ms max 2.48 ms diff --git a/messung_perf/ab_solver7.time b/messung_perf/ab_solver7.time new file mode 100644 index 00000000..1b0f6265 --- /dev/null +++ b/messung_perf/ab_solver7.time @@ -0,0 +1 @@ +3.31 s cpu 3.14 s exit 0 diff --git a/messung_perf/ab_solver7.txt b/messung_perf/ab_solver7.txt new file mode 100644 index 00000000..7ebd7cde --- /dev/null +++ b/messung_perf/ab_solver7.txt @@ -0,0 +1,3 @@ +0 2.5 +1 2.5 +fingerprint 8e68d9085dfa844a calls 3749 diff --git a/messung_perf/ab_solver7.txt.err b/messung_perf/ab_solver7.txt.err new file mode 100644 index 00000000..1fda52cf --- /dev/null +++ b/messung_perf/ab_solver7.txt.err @@ -0,0 +1,3 @@ +2.33 s, 3749 engine calls, 0.622 ms/call +zeit board=3 heuristik alle: n 3749 p50 0.62 ms p99 0.91 ms max 2.53 ms +zeit board=3 heuristik live: n 7 p50 1.70 ms p99 2.53 ms max 2.53 ms diff --git a/messung_perf/abc_solver2.time b/messung_perf/abc_solver2.time new file mode 100644 index 00000000..6591a51a --- /dev/null +++ b/messung_perf/abc_solver2.time @@ -0,0 +1 @@ +629.79 s cpu 599.05 s exit -1 diff --git a/messung_perf/abc_solver2.txt b/messung_perf/abc_solver2.txt new file mode 100644 index 00000000..e69de29b diff --git a/messung_perf/abc_solver2.txt.err b/messung_perf/abc_solver2.txt.err new file mode 100644 index 00000000..e69de29b diff --git a/messung_perf/abc_solver3.time b/messung_perf/abc_solver3.time new file mode 100644 index 00000000..3ef2e4f2 --- /dev/null +++ b/messung_perf/abc_solver3.time @@ -0,0 +1 @@ +629.83 s cpu 598.52 s exit -1 diff --git a/messung_perf/abc_solver3.txt b/messung_perf/abc_solver3.txt new file mode 100644 index 00000000..e69de29b diff --git a/messung_perf/abc_solver3.txt.err b/messung_perf/abc_solver3.txt.err new file mode 100644 index 00000000..e69de29b diff --git a/messung_perf/c80_solver2.time b/messung_perf/c80_solver2.time new file mode 100644 index 00000000..dd0d79bf --- /dev/null +++ b/messung_perf/c80_solver2.time @@ -0,0 +1 @@ +61.98 s cpu 60.28 s exit 0 diff --git a/messung_perf/c80_solver2.txt b/messung_perf/c80_solver2.txt new file mode 100644 index 00000000..9b4ba5ee --- /dev/null +++ b/messung_perf/c80_solver2.txt @@ -0,0 +1 @@ +fingerprint 159b95175f3d8384 calls 80 diff --git a/messung_perf/c80_solver2.txt.err b/messung_perf/c80_solver2.txt.err new file mode 100644 index 00000000..15dabd68 --- /dev/null +++ b/messung_perf/c80_solver2.txt.err @@ -0,0 +1,3 @@ +60.86 s, 80 engine calls, 760.711 ms/call +zeit board=3 flop-solver alle: n 80 p50 1411.32 ms p99 1542.06 ms max 1578.42 ms +zeit board=3 flop-solver live: n 1 p50 1515.52 ms p99 1515.52 ms max 1515.52 ms diff --git a/messung_perf/c80_solver4.time b/messung_perf/c80_solver4.time new file mode 100644 index 00000000..732e4255 --- /dev/null +++ b/messung_perf/c80_solver4.time @@ -0,0 +1 @@ +62.38 s cpu 60.50 s exit 0 diff --git a/messung_perf/c80_solver4.txt b/messung_perf/c80_solver4.txt new file mode 100644 index 00000000..9b4ba5ee --- /dev/null +++ b/messung_perf/c80_solver4.txt @@ -0,0 +1 @@ +fingerprint 159b95175f3d8384 calls 80 diff --git a/messung_perf/c80_solver4.txt.err b/messung_perf/c80_solver4.txt.err new file mode 100644 index 00000000..f7c0e39d --- /dev/null +++ b/messung_perf/c80_solver4.txt.err @@ -0,0 +1,3 @@ +61.23 s, 80 engine calls, 765.381 ms/call +zeit board=3 flop-solver alle: n 80 p50 1397.02 ms p99 1592.77 ms max 1594.93 ms +zeit board=3 flop-solver live: n 1 p50 1520.98 ms p99 1520.98 ms max 1520.98 ms diff --git a/messung_perf/c80b_solver2.time b/messung_perf/c80b_solver2.time new file mode 100644 index 00000000..68136cd6 --- /dev/null +++ b/messung_perf/c80b_solver2.time @@ -0,0 +1 @@ +58.94 s cpu 56.97 s exit 0 diff --git a/messung_perf/c80b_solver2.txt b/messung_perf/c80b_solver2.txt new file mode 100644 index 00000000..9b4ba5ee --- /dev/null +++ b/messung_perf/c80b_solver2.txt @@ -0,0 +1 @@ +fingerprint 159b95175f3d8384 calls 80 diff --git a/messung_perf/c80b_solver2.txt.err b/messung_perf/c80b_solver2.txt.err new file mode 100644 index 00000000..919c3461 --- /dev/null +++ b/messung_perf/c80b_solver2.txt.err @@ -0,0 +1,3 @@ +58.02 s, 80 engine calls, 725.236 ms/call +zeit board=3 flop-solver alle: n 80 p50 1337.76 ms p99 1501.89 ms max 1867.20 ms +zeit board=3 flop-solver live: n 1 p50 1360.12 ms p99 1360.12 ms max 1360.12 ms diff --git a/messung_perf/c80b_solver5.time b/messung_perf/c80b_solver5.time new file mode 100644 index 00000000..af24c946 --- /dev/null +++ b/messung_perf/c80b_solver5.time @@ -0,0 +1 @@ +45.53 s cpu 44.02 s exit 0 diff --git a/messung_perf/c80b_solver5.txt b/messung_perf/c80b_solver5.txt new file mode 100644 index 00000000..9b4ba5ee --- /dev/null +++ b/messung_perf/c80b_solver5.txt @@ -0,0 +1 @@ +fingerprint 159b95175f3d8384 calls 80 diff --git a/messung_perf/c80b_solver5.txt.err b/messung_perf/c80b_solver5.txt.err new file mode 100644 index 00000000..55092e71 --- /dev/null +++ b/messung_perf/c80b_solver5.txt.err @@ -0,0 +1,3 @@ +44.50 s, 80 engine calls, 556.240 ms/call +zeit board=3 flop-solver alle: n 80 p50 1000.33 ms p99 1158.33 ms max 1533.19 ms +zeit board=3 flop-solver live: n 1 p50 1053.87 ms p99 1053.87 ms max 1053.87 ms diff --git a/messung_perf/c80c_solver5.time b/messung_perf/c80c_solver5.time new file mode 100644 index 00000000..66c2df12 --- /dev/null +++ b/messung_perf/c80c_solver5.time @@ -0,0 +1 @@ +46.42 s cpu 45.38 s exit 0 diff --git a/messung_perf/c80c_solver5.txt b/messung_perf/c80c_solver5.txt new file mode 100644 index 00000000..9b4ba5ee --- /dev/null +++ b/messung_perf/c80c_solver5.txt @@ -0,0 +1 @@ +fingerprint 159b95175f3d8384 calls 80 diff --git a/messung_perf/c80c_solver5.txt.err b/messung_perf/c80c_solver5.txt.err new file mode 100644 index 00000000..43e29c1e --- /dev/null +++ b/messung_perf/c80c_solver5.txt.err @@ -0,0 +1,3 @@ +45.46 s, 80 engine calls, 568.202 ms/call +zeit board=3 flop-solver alle: n 80 p50 1072.67 ms p99 1180.75 ms max 1218.48 ms +zeit board=3 flop-solver live: n 1 p50 1106.11 ms p99 1106.11 ms max 1106.11 ms diff --git a/messung_perf/c80c_solver6.time b/messung_perf/c80c_solver6.time new file mode 100644 index 00000000..57474e60 --- /dev/null +++ b/messung_perf/c80c_solver6.time @@ -0,0 +1 @@ +72.62 s cpu 70.73 s exit 0 diff --git a/messung_perf/c80c_solver6.txt b/messung_perf/c80c_solver6.txt new file mode 100644 index 00000000..9b4ba5ee --- /dev/null +++ b/messung_perf/c80c_solver6.txt @@ -0,0 +1 @@ +fingerprint 159b95175f3d8384 calls 80 diff --git a/messung_perf/c80c_solver6.txt.err b/messung_perf/c80c_solver6.txt.err new file mode 100644 index 00000000..fe7253f0 --- /dev/null +++ b/messung_perf/c80c_solver6.txt.err @@ -0,0 +1,3 @@ +71.53 s, 80 engine calls, 894.155 ms/call +zeit board=3 flop-solver alle: n 80 p50 1665.73 ms p99 1853.10 ms max 1900.28 ms +zeit board=3 flop-solver live: n 1 p50 1792.24 ms p99 1792.24 ms max 1792.24 ms diff --git a/messung_perf/c80d_solver5.time b/messung_perf/c80d_solver5.time new file mode 100644 index 00000000..92a42645 --- /dev/null +++ b/messung_perf/c80d_solver5.time @@ -0,0 +1 @@ +49.39 s cpu 46.94 s exit 0 diff --git a/messung_perf/c80d_solver5.txt b/messung_perf/c80d_solver5.txt new file mode 100644 index 00000000..9b4ba5ee --- /dev/null +++ b/messung_perf/c80d_solver5.txt @@ -0,0 +1 @@ +fingerprint 159b95175f3d8384 calls 80 diff --git a/messung_perf/c80d_solver5.txt.err b/messung_perf/c80d_solver5.txt.err new file mode 100644 index 00000000..2320d145 --- /dev/null +++ b/messung_perf/c80d_solver5.txt.err @@ -0,0 +1,3 @@ +48.40 s, 80 engine calls, 605.003 ms/call +zeit board=3 flop-solver alle: n 80 p50 1124.28 ms p99 1474.31 ms max 1583.77 ms +zeit board=3 flop-solver live: n 1 p50 1132.59 ms p99 1132.59 ms max 1132.59 ms diff --git a/messung_perf/c80d_solver7.time b/messung_perf/c80d_solver7.time new file mode 100644 index 00000000..8b45af37 --- /dev/null +++ b/messung_perf/c80d_solver7.time @@ -0,0 +1 @@ +45.44 s cpu 42.91 s exit 0 diff --git a/messung_perf/c80d_solver7.txt b/messung_perf/c80d_solver7.txt new file mode 100644 index 00000000..9b4ba5ee --- /dev/null +++ b/messung_perf/c80d_solver7.txt @@ -0,0 +1 @@ +fingerprint 159b95175f3d8384 calls 80 diff --git a/messung_perf/c80d_solver7.txt.err b/messung_perf/c80d_solver7.txt.err new file mode 100644 index 00000000..343fa82f --- /dev/null +++ b/messung_perf/c80d_solver7.txt.err @@ -0,0 +1,3 @@ +44.32 s, 80 engine calls, 554.017 ms/call +zeit board=3 flop-solver alle: n 80 p50 1009.12 ms p99 1493.21 ms max 1758.18 ms +zeit board=3 flop-solver live: n 1 p50 1003.08 ms p99 1003.08 ms max 1003.08 ms diff --git a/messung_perf/c80e_solver7.time b/messung_perf/c80e_solver7.time new file mode 100644 index 00000000..f4ba30e8 --- /dev/null +++ b/messung_perf/c80e_solver7.time @@ -0,0 +1 @@ +34.12 s cpu 33.34 s exit 0 diff --git a/messung_perf/c80e_solver7.txt b/messung_perf/c80e_solver7.txt new file mode 100644 index 00000000..9b4ba5ee --- /dev/null +++ b/messung_perf/c80e_solver7.txt @@ -0,0 +1 @@ +fingerprint 159b95175f3d8384 calls 80 diff --git a/messung_perf/c80e_solver7.txt.err b/messung_perf/c80e_solver7.txt.err new file mode 100644 index 00000000..517218f1 --- /dev/null +++ b/messung_perf/c80e_solver7.txt.err @@ -0,0 +1,3 @@ +33.29 s, 80 engine calls, 416.162 ms/call +zeit board=3 flop-solver alle: n 80 p50 760.38 ms p99 860.41 ms max 873.55 ms +zeit board=3 flop-solver live: n 1 p50 830.35 ms p99 830.35 ms max 830.35 ms diff --git a/messung_perf/c80e_solver7n.time b/messung_perf/c80e_solver7n.time new file mode 100644 index 00000000..16f91fda --- /dev/null +++ b/messung_perf/c80e_solver7n.time @@ -0,0 +1 @@ +32.95 s cpu 31.78 s exit 0 diff --git a/messung_perf/c80e_solver7n.txt b/messung_perf/c80e_solver7n.txt new file mode 100644 index 00000000..9b4ba5ee --- /dev/null +++ b/messung_perf/c80e_solver7n.txt @@ -0,0 +1 @@ +fingerprint 159b95175f3d8384 calls 80 diff --git a/messung_perf/c80e_solver7n.txt.err b/messung_perf/c80e_solver7n.txt.err new file mode 100644 index 00000000..02fb6cd2 --- /dev/null +++ b/messung_perf/c80e_solver7n.txt.err @@ -0,0 +1,3 @@ +32.02 s, 80 engine calls, 400.190 ms/call +zeit board=3 flop-solver alle: n 80 p50 749.16 ms p99 810.44 ms max 811.09 ms +zeit board=3 flop-solver live: n 1 p50 774.07 ms p99 774.07 ms max 774.07 ms diff --git a/messung_perf/c80n_solver2n.time b/messung_perf/c80n_solver2n.time new file mode 100644 index 00000000..44e09889 --- /dev/null +++ b/messung_perf/c80n_solver2n.time @@ -0,0 +1 @@ +64.59 s cpu 61.91 s exit 0 diff --git a/messung_perf/c80n_solver2n.txt b/messung_perf/c80n_solver2n.txt new file mode 100644 index 00000000..9b4ba5ee --- /dev/null +++ b/messung_perf/c80n_solver2n.txt @@ -0,0 +1 @@ +fingerprint 159b95175f3d8384 calls 80 diff --git a/messung_perf/c80n_solver2n.txt.err b/messung_perf/c80n_solver2n.txt.err new file mode 100644 index 00000000..a9d021a0 --- /dev/null +++ b/messung_perf/c80n_solver2n.txt.err @@ -0,0 +1,3 @@ +63.44 s, 80 engine calls, 792.991 ms/call +zeit board=3 flop-solver alle: n 80 p50 1465.36 ms p99 1633.52 ms max 1675.33 ms +zeit board=3 flop-solver live: n 1 p50 1558.73 ms p99 1558.73 ms max 1558.73 ms diff --git a/messung_perf/c80n_solver7n.time b/messung_perf/c80n_solver7n.time new file mode 100644 index 00000000..a670c8d4 --- /dev/null +++ b/messung_perf/c80n_solver7n.time @@ -0,0 +1 @@ +45.90 s cpu 43.78 s exit 0 diff --git a/messung_perf/c80n_solver7n.txt b/messung_perf/c80n_solver7n.txt new file mode 100644 index 00000000..9b4ba5ee --- /dev/null +++ b/messung_perf/c80n_solver7n.txt @@ -0,0 +1 @@ +fingerprint 159b95175f3d8384 calls 80 diff --git a/messung_perf/c80n_solver7n.txt.err b/messung_perf/c80n_solver7n.txt.err new file mode 100644 index 00000000..d7ca2e38 --- /dev/null +++ b/messung_perf/c80n_solver7n.txt.err @@ -0,0 +1,3 @@ +44.76 s, 80 engine calls, 559.535 ms/call +zeit board=3 flop-solver alle: n 80 p50 1052.51 ms p99 1153.61 ms max 1182.30 ms +zeit board=3 flop-solver live: n 1 p50 1088.59 ms p99 1088.59 ms max 1088.59 ms diff --git a/messung_perf/evaltest.out.err b/messung_perf/evaltest.out.err new file mode 100644 index 00000000..df517c2e --- /dev/null +++ b/messung_perf/evaltest.out.err @@ -0,0 +1,2 @@ +6 cards: 20358520 hands identical +7 cards: 133784560 hands identical diff --git a/messung_perf/filter.patch b/messung_perf/filter.patch new file mode 100644 index 00000000..59ba6439 --- /dev/null +++ b/messung_perf/filter.patch @@ -0,0 +1,113 @@ +diff --git a/src/engine/range_filter.rs b/src/engine/range_filter.rs +index 5867544..09f59a1 100644 +--- a/src/engine/range_filter.rs ++++ b/src/engine/range_filter.rs +@@ -1,4 +1,7 @@ + use crate::card::{deck, Card}; ++use std::cell::RefCell; ++use std::collections::HashMap; ++use std::rc::Rc; + use crate::exploit::range_spec::{Continuation, RangeSpec}; + use crate::preflop::hand_percentile::percentile; + use crate::read::draw::Draw; +@@ -118,25 +121,85 @@ const RELAXED_HI: f64 = 0.5; + /// When no hand of the preflop band meets some floor, the band contradicts what the + /// villain did; the action wins and the band is relaxed to `[0, max(hi, 0.5)]`. + pub fn range_filter(spec: &RangeSpec, rules: Rules, variant: Variant, board: &[Card]) -> HandFilter { +- let board = board.to_vec(); +- let (first, starved) = acceptances(spec, &rules, variant, &board); +- let (spec, qs) = if starved { +- let relaxed = RangeSpec { lo: 0.0, hi: spec.hi.max(RELAXED_HI), continues: spec.continues.clone() }; +- let (qs, _) = acceptances(&relaxed, &rules, variant, &board); +- (relaxed, qs) +- } else { +- (spec.clone(), first) ++ // The range depends on (spec, rules, variant, board) only - not on hero's cards - so one decision ++ // and every decision after it at the same spot (LBR asks every combo at a node) share it: the ++ // acceptances are computed once per key, and each hand's verdict once per key and hand. Text of ++ // the key: `Debug` of f64 round-trips, so different values never share an entry. ++ let key = format!("{spec:?}|{rules:?}|{variant:?}|{board:?}"); ++ let shared = FILTERS.with(|f| f.borrow().get(&key).cloned()); ++ let shared = match shared { ++ Some(s) => s, ++ None => { ++ let s = Rc::new(Kept::new(spec, rules, variant, board)); ++ FILTERS.with(|f| { ++ let mut f = f.borrow_mut(); ++ if f.len() >= FILTER_CACHE { ++ f.clear(); ++ } ++ f.insert(key, s.clone()); ++ }); ++ s ++ } + }; +- Box::new(move |hand: &[Card]| { +- let p = percentile(variant, hand); +- p >= spec.lo +- && p <= spec.hi +- && spec.continues.iter().zip(&qs).enumerate().all(|(step, (c, q))| { +- match meets(&rules, c, hand, &board) { ++ Box::new(move |hand: &[Card]| shared.contains(hand)) ++} ++ ++/// Ranges kept per thread (a decision builds a few; LBR revisits one spot ~1000 times in a row). ++const FILTER_CACHE: usize = 256; ++ ++thread_local! { ++ static FILTERS: RefCell>> = RefCell::new(HashMap::new()); ++} ++ ++/// One built range: the (possibly relaxed) spec, its ticket thresholds, and the verdict per ordered ++/// two-card hand once asked (0 = not yet, 1 = out, 2 = in). ++struct Kept { ++ spec: RangeSpec, ++ qs: Vec, ++ rules: Rules, ++ variant: Variant, ++ board: Vec, ++ verdict: RefCell>, ++} ++ ++impl Kept { ++ fn new(spec: &RangeSpec, rules: Rules, variant: Variant, board: &[Card]) -> Kept { ++ let board = board.to_vec(); ++ let (first, starved) = acceptances(spec, &rules, variant, &board); ++ let (spec, qs) = if starved { ++ let relaxed = RangeSpec { lo: 0.0, hi: spec.hi.max(RELAXED_HI), continues: spec.continues.clone() }; ++ let (qs, _) = acceptances(&relaxed, &rules, variant, &board); ++ (relaxed, qs) ++ } else { ++ (spec.clone(), first) ++ }; ++ Kept { spec, qs, rules, variant, board, verdict: RefCell::new(vec![0; 52 * 52]) } ++ } ++ ++ fn judge(&self, hand: &[Card]) -> bool { ++ let p = percentile(self.variant, hand); ++ p >= self.spec.lo ++ && p <= self.spec.hi ++ && self.spec.continues.iter().zip(&self.qs).enumerate().all(|(step, (c, q))| { ++ match meets(&self.rules, c, hand, &self.board) { + Some(true) => true, + Some(false) => *q > 0.0 && ticket(hand, step) < *q, + None => false, + } + }) +- }) ++ } ++ ++ fn contains(&self, hand: &[Card]) -> bool { ++ if hand.len() != 2 { ++ return self.judge(hand); ++ } ++ let i = hand[0].index() as usize * 52 + hand[1].index() as usize; ++ let known = self.verdict.borrow()[i]; ++ if known != 0 { ++ return known == 2; ++ } ++ let v = self.judge(hand); ++ self.verdict.borrow_mut()[i] = if v { 2 } else { 1 }; ++ v ++ } + } diff --git a/messung_perf/g_probe8.time b/messung_perf/g_probe8.time new file mode 100644 index 00000000..ecf0a6fd --- /dev/null +++ b/messung_perf/g_probe8.time @@ -0,0 +1 @@ +9.07 s cpu 8.83 s exit 0 diff --git a/messung_perf/g_probe8.txt b/messung_perf/g_probe8.txt new file mode 100644 index 00000000..4cf5c53d --- /dev/null +++ b/messung_perf/g_probe8.txt @@ -0,0 +1,7 @@ +0 2.5 +1 2.5 +2 2.5 +3 2.5 +4 2.5 +5 2.5 +fingerprint 70ed8d3093c78a44 calls 11945 diff --git a/messung_perf/g_probe8.txt.err b/messung_perf/g_probe8.txt.err new file mode 100644 index 00000000..3a7ad3f9 --- /dev/null +++ b/messung_perf/g_probe8.txt.err @@ -0,0 +1,7 @@ +8.21 s, 11945 engine calls, 0.687 ms/call +zeit board=3 heuristik alle: n 11288 p50 0.54 ms p99 0.74 ms max 2.23 ms +zeit board=3 heuristik live: n 22 p50 1.35 ms p99 2.23 ms max 2.23 ms +zeit board=4 heuristik alle: n 499 p50 0.43 ms p99 0.73 ms max 0.78 ms +zeit board=4 heuristik live: n 1 p50 0.50 ms p99 0.50 ms max 0.50 ms +zeit board=4 turn-solver alle: n 158 p50 0.59 ms p99 0.75 ms max 864.41 ms +zeit board=4 turn-solver live: n 2 p50 864.41 ms p99 864.41 ms max 864.41 ms diff --git a/messung_perf/g_probe9.time b/messung_perf/g_probe9.time new file mode 100644 index 00000000..47becb33 --- /dev/null +++ b/messung_perf/g_probe9.time @@ -0,0 +1 @@ +8.89 s cpu 8.48 s exit 0 diff --git a/messung_perf/g_probe9.txt b/messung_perf/g_probe9.txt new file mode 100644 index 00000000..4cf5c53d --- /dev/null +++ b/messung_perf/g_probe9.txt @@ -0,0 +1,7 @@ +0 2.5 +1 2.5 +2 2.5 +3 2.5 +4 2.5 +5 2.5 +fingerprint 70ed8d3093c78a44 calls 11945 diff --git a/messung_perf/g_probe9.txt.err b/messung_perf/g_probe9.txt.err new file mode 100644 index 00000000..ab97dc76 --- /dev/null +++ b/messung_perf/g_probe9.txt.err @@ -0,0 +1,7 @@ +7.90 s, 11945 engine calls, 0.661 ms/call +zeit board=3 heuristik alle: n 11288 p50 0.54 ms p99 0.74 ms max 2.26 ms +zeit board=3 heuristik live: n 22 p50 1.55 ms p99 2.26 ms max 2.26 ms +zeit board=4 heuristik alle: n 499 p50 0.40 ms p99 0.74 ms max 0.80 ms +zeit board=4 heuristik live: n 1 p50 0.32 ms p99 0.32 ms max 0.32 ms +zeit board=4 turn-solver alle: n 158 p50 0.59 ms p99 0.70 ms max 692.49 ms +zeit board=4 turn-solver live: n 2 p50 692.49 ms p99 692.49 ms max 692.49 ms diff --git a/messung_perf/hebel/probe5.1.txt b/messung_perf/hebel/probe5.1.txt new file mode 100644 index 00000000..fb37d63f --- /dev/null +++ b/messung_perf/hebel/probe5.1.txt @@ -0,0 +1,13 @@ +0 2.5 +1 2.5 +2 -2.5 +3 2.5 +4 2.5 +5 2.5 +6 -2.5 +7 2.5 +8 -5 +9 2.5 +10 2.5 +11 4.15 +fingerprint b3ac2b3a905a8ac8 calls 31464 diff --git a/messung_perf/hebel/probe5.1.txt.err b/messung_perf/hebel/probe5.1.txt.err new file mode 100644 index 00000000..1eb265ee --- /dev/null +++ b/messung_perf/hebel/probe5.1.txt.err @@ -0,0 +1 @@ +21.73 s, 31464 engine calls, 0.691 ms/call diff --git a/messung_perf/hebel/probe5.2.txt b/messung_perf/hebel/probe5.2.txt new file mode 100644 index 00000000..fb37d63f --- /dev/null +++ b/messung_perf/hebel/probe5.2.txt @@ -0,0 +1,13 @@ +0 2.5 +1 2.5 +2 -2.5 +3 2.5 +4 2.5 +5 2.5 +6 -2.5 +7 2.5 +8 -5 +9 2.5 +10 2.5 +11 4.15 +fingerprint b3ac2b3a905a8ac8 calls 31464 diff --git a/messung_perf/hebel/probe5.2.txt.err b/messung_perf/hebel/probe5.2.txt.err new file mode 100644 index 00000000..e43daaa6 --- /dev/null +++ b/messung_perf/hebel/probe5.2.txt.err @@ -0,0 +1 @@ +21.40 s, 31464 engine calls, 0.680 ms/call diff --git a/messung_perf/hebel/probe5.3.txt b/messung_perf/hebel/probe5.3.txt new file mode 100644 index 00000000..fb37d63f --- /dev/null +++ b/messung_perf/hebel/probe5.3.txt @@ -0,0 +1,13 @@ +0 2.5 +1 2.5 +2 -2.5 +3 2.5 +4 2.5 +5 2.5 +6 -2.5 +7 2.5 +8 -5 +9 2.5 +10 2.5 +11 4.15 +fingerprint b3ac2b3a905a8ac8 calls 31464 diff --git a/messung_perf/hebel/probe5.3.txt.err b/messung_perf/hebel/probe5.3.txt.err new file mode 100644 index 00000000..bdd681ac --- /dev/null +++ b/messung_perf/hebel/probe5.3.txt.err @@ -0,0 +1 @@ +21.63 s, 31464 engine calls, 0.687 ms/call diff --git a/messung_perf/hebel/probe5.c1.txt b/messung_perf/hebel/probe5.c1.txt new file mode 100644 index 00000000..fb37d63f --- /dev/null +++ b/messung_perf/hebel/probe5.c1.txt @@ -0,0 +1,13 @@ +0 2.5 +1 2.5 +2 -2.5 +3 2.5 +4 2.5 +5 2.5 +6 -2.5 +7 2.5 +8 -5 +9 2.5 +10 2.5 +11 4.15 +fingerprint b3ac2b3a905a8ac8 calls 31464 diff --git a/messung_perf/hebel/probe5.c1.txt.err b/messung_perf/hebel/probe5.c1.txt.err new file mode 100644 index 00000000..6333a0ce --- /dev/null +++ b/messung_perf/hebel/probe5.c1.txt.err @@ -0,0 +1 @@ +19.97 s, 31464 engine calls, 0.635 ms/call diff --git a/messung_perf/hebel/probe5.c2.txt b/messung_perf/hebel/probe5.c2.txt new file mode 100644 index 00000000..fb37d63f --- /dev/null +++ b/messung_perf/hebel/probe5.c2.txt @@ -0,0 +1,13 @@ +0 2.5 +1 2.5 +2 -2.5 +3 2.5 +4 2.5 +5 2.5 +6 -2.5 +7 2.5 +8 -5 +9 2.5 +10 2.5 +11 4.15 +fingerprint b3ac2b3a905a8ac8 calls 31464 diff --git a/messung_perf/hebel/probe5.c2.txt.err b/messung_perf/hebel/probe5.c2.txt.err new file mode 100644 index 00000000..a77f8135 --- /dev/null +++ b/messung_perf/hebel/probe5.c2.txt.err @@ -0,0 +1 @@ +21.66 s, 31464 engine calls, 0.688 ms/call diff --git a/messung_perf/hebel/probe5.c3.txt b/messung_perf/hebel/probe5.c3.txt new file mode 100644 index 00000000..fb37d63f --- /dev/null +++ b/messung_perf/hebel/probe5.c3.txt @@ -0,0 +1,13 @@ +0 2.5 +1 2.5 +2 -2.5 +3 2.5 +4 2.5 +5 2.5 +6 -2.5 +7 2.5 +8 -5 +9 2.5 +10 2.5 +11 4.15 +fingerprint b3ac2b3a905a8ac8 calls 31464 diff --git a/messung_perf/hebel/probe5.c3.txt.err b/messung_perf/hebel/probe5.c3.txt.err new file mode 100644 index 00000000..368061f2 --- /dev/null +++ b/messung_perf/hebel/probe5.c3.txt.err @@ -0,0 +1 @@ +19.49 s, 31464 engine calls, 0.620 ms/call diff --git a/messung_perf/hebel/vabort.1.txt b/messung_perf/hebel/vabort.1.txt new file mode 100644 index 00000000..fb37d63f --- /dev/null +++ b/messung_perf/hebel/vabort.1.txt @@ -0,0 +1,13 @@ +0 2.5 +1 2.5 +2 -2.5 +3 2.5 +4 2.5 +5 2.5 +6 -2.5 +7 2.5 +8 -5 +9 2.5 +10 2.5 +11 4.15 +fingerprint b3ac2b3a905a8ac8 calls 31464 diff --git a/messung_perf/hebel/vabort.1.txt.err b/messung_perf/hebel/vabort.1.txt.err new file mode 100644 index 00000000..942e8f63 --- /dev/null +++ b/messung_perf/hebel/vabort.1.txt.err @@ -0,0 +1 @@ +21.06 s, 31464 engine calls, 0.669 ms/call diff --git a/messung_perf/hebel/vabort.2.txt b/messung_perf/hebel/vabort.2.txt new file mode 100644 index 00000000..fb37d63f --- /dev/null +++ b/messung_perf/hebel/vabort.2.txt @@ -0,0 +1,13 @@ +0 2.5 +1 2.5 +2 -2.5 +3 2.5 +4 2.5 +5 2.5 +6 -2.5 +7 2.5 +8 -5 +9 2.5 +10 2.5 +11 4.15 +fingerprint b3ac2b3a905a8ac8 calls 31464 diff --git a/messung_perf/hebel/vabort.2.txt.err b/messung_perf/hebel/vabort.2.txt.err new file mode 100644 index 00000000..1ddf8dff --- /dev/null +++ b/messung_perf/hebel/vabort.2.txt.err @@ -0,0 +1 @@ +22.07 s, 31464 engine calls, 0.701 ms/call diff --git a/messung_perf/hebel/vabort.3.txt b/messung_perf/hebel/vabort.3.txt new file mode 100644 index 00000000..fb37d63f --- /dev/null +++ b/messung_perf/hebel/vabort.3.txt @@ -0,0 +1,13 @@ +0 2.5 +1 2.5 +2 -2.5 +3 2.5 +4 2.5 +5 2.5 +6 -2.5 +7 2.5 +8 -5 +9 2.5 +10 2.5 +11 4.15 +fingerprint b3ac2b3a905a8ac8 calls 31464 diff --git a/messung_perf/hebel/vabort.3.txt.err b/messung_perf/hebel/vabort.3.txt.err new file mode 100644 index 00000000..f9f670dd --- /dev/null +++ b/messung_perf/hebel/vabort.3.txt.err @@ -0,0 +1 @@ +19.14 s, 31464 engine calls, 0.608 ms/call diff --git a/messung_perf/hebel/vabort.c1.txt b/messung_perf/hebel/vabort.c1.txt new file mode 100644 index 00000000..fb37d63f --- /dev/null +++ b/messung_perf/hebel/vabort.c1.txt @@ -0,0 +1,13 @@ +0 2.5 +1 2.5 +2 -2.5 +3 2.5 +4 2.5 +5 2.5 +6 -2.5 +7 2.5 +8 -5 +9 2.5 +10 2.5 +11 4.15 +fingerprint b3ac2b3a905a8ac8 calls 31464 diff --git a/messung_perf/hebel/vabort.c1.txt.err b/messung_perf/hebel/vabort.c1.txt.err new file mode 100644 index 00000000..32b730b9 --- /dev/null +++ b/messung_perf/hebel/vabort.c1.txt.err @@ -0,0 +1 @@ +20.04 s, 31464 engine calls, 0.637 ms/call diff --git a/messung_perf/hebel/vabort.c2.txt b/messung_perf/hebel/vabort.c2.txt new file mode 100644 index 00000000..fb37d63f --- /dev/null +++ b/messung_perf/hebel/vabort.c2.txt @@ -0,0 +1,13 @@ +0 2.5 +1 2.5 +2 -2.5 +3 2.5 +4 2.5 +5 2.5 +6 -2.5 +7 2.5 +8 -5 +9 2.5 +10 2.5 +11 4.15 +fingerprint b3ac2b3a905a8ac8 calls 31464 diff --git a/messung_perf/hebel/vabort.c2.txt.err b/messung_perf/hebel/vabort.c2.txt.err new file mode 100644 index 00000000..8eaacf32 --- /dev/null +++ b/messung_perf/hebel/vabort.c2.txt.err @@ -0,0 +1 @@ +20.84 s, 31464 engine calls, 0.662 ms/call diff --git a/messung_perf/hebel/vabort.c3.txt b/messung_perf/hebel/vabort.c3.txt new file mode 100644 index 00000000..fb37d63f --- /dev/null +++ b/messung_perf/hebel/vabort.c3.txt @@ -0,0 +1,13 @@ +0 2.5 +1 2.5 +2 -2.5 +3 2.5 +4 2.5 +5 2.5 +6 -2.5 +7 2.5 +8 -5 +9 2.5 +10 2.5 +11 4.15 +fingerprint b3ac2b3a905a8ac8 calls 31464 diff --git a/messung_perf/hebel/vabort.c3.txt.err b/messung_perf/hebel/vabort.c3.txt.err new file mode 100644 index 00000000..9baa7126 --- /dev/null +++ b/messung_perf/hebel/vabort.c3.txt.err @@ -0,0 +1 @@ +19.00 s, 31464 engine calls, 0.604 ms/call diff --git a/messung_perf/hebel/valle.1.txt b/messung_perf/hebel/valle.1.txt new file mode 100644 index 00000000..fb37d63f --- /dev/null +++ b/messung_perf/hebel/valle.1.txt @@ -0,0 +1,13 @@ +0 2.5 +1 2.5 +2 -2.5 +3 2.5 +4 2.5 +5 2.5 +6 -2.5 +7 2.5 +8 -5 +9 2.5 +10 2.5 +11 4.15 +fingerprint b3ac2b3a905a8ac8 calls 31464 diff --git a/messung_perf/hebel/valle.1.txt.err b/messung_perf/hebel/valle.1.txt.err new file mode 100644 index 00000000..ba959282 --- /dev/null +++ b/messung_perf/hebel/valle.1.txt.err @@ -0,0 +1 @@ +26.46 s, 31464 engine calls, 0.841 ms/call diff --git a/messung_perf/hebel/valle.2.txt b/messung_perf/hebel/valle.2.txt new file mode 100644 index 00000000..fb37d63f --- /dev/null +++ b/messung_perf/hebel/valle.2.txt @@ -0,0 +1,13 @@ +0 2.5 +1 2.5 +2 -2.5 +3 2.5 +4 2.5 +5 2.5 +6 -2.5 +7 2.5 +8 -5 +9 2.5 +10 2.5 +11 4.15 +fingerprint b3ac2b3a905a8ac8 calls 31464 diff --git a/messung_perf/hebel/valle.2.txt.err b/messung_perf/hebel/valle.2.txt.err new file mode 100644 index 00000000..fffef59b --- /dev/null +++ b/messung_perf/hebel/valle.2.txt.err @@ -0,0 +1 @@ +19.94 s, 31464 engine calls, 0.634 ms/call diff --git a/messung_perf/hebel/valle.3.txt b/messung_perf/hebel/valle.3.txt new file mode 100644 index 00000000..fb37d63f --- /dev/null +++ b/messung_perf/hebel/valle.3.txt @@ -0,0 +1,13 @@ +0 2.5 +1 2.5 +2 -2.5 +3 2.5 +4 2.5 +5 2.5 +6 -2.5 +7 2.5 +8 -5 +9 2.5 +10 2.5 +11 4.15 +fingerprint b3ac2b3a905a8ac8 calls 31464 diff --git a/messung_perf/hebel/valle.3.txt.err b/messung_perf/hebel/valle.3.txt.err new file mode 100644 index 00000000..af8c094a --- /dev/null +++ b/messung_perf/hebel/valle.3.txt.err @@ -0,0 +1 @@ +17.17 s, 31464 engine calls, 0.546 ms/call diff --git a/messung_perf/hebel/valle.c1.txt b/messung_perf/hebel/valle.c1.txt new file mode 100644 index 00000000..fb37d63f --- /dev/null +++ b/messung_perf/hebel/valle.c1.txt @@ -0,0 +1,13 @@ +0 2.5 +1 2.5 +2 -2.5 +3 2.5 +4 2.5 +5 2.5 +6 -2.5 +7 2.5 +8 -5 +9 2.5 +10 2.5 +11 4.15 +fingerprint b3ac2b3a905a8ac8 calls 31464 diff --git a/messung_perf/hebel/valle.c1.txt.err b/messung_perf/hebel/valle.c1.txt.err new file mode 100644 index 00000000..59d7e1e9 --- /dev/null +++ b/messung_perf/hebel/valle.c1.txt.err @@ -0,0 +1 @@ +18.96 s, 31464 engine calls, 0.603 ms/call diff --git a/messung_perf/hebel/valle.c2.txt b/messung_perf/hebel/valle.c2.txt new file mode 100644 index 00000000..fb37d63f --- /dev/null +++ b/messung_perf/hebel/valle.c2.txt @@ -0,0 +1,13 @@ +0 2.5 +1 2.5 +2 -2.5 +3 2.5 +4 2.5 +5 2.5 +6 -2.5 +7 2.5 +8 -5 +9 2.5 +10 2.5 +11 4.15 +fingerprint b3ac2b3a905a8ac8 calls 31464 diff --git a/messung_perf/hebel/valle.c2.txt.err b/messung_perf/hebel/valle.c2.txt.err new file mode 100644 index 00000000..4cce144b --- /dev/null +++ b/messung_perf/hebel/valle.c2.txt.err @@ -0,0 +1 @@ +17.90 s, 31464 engine calls, 0.569 ms/call diff --git a/messung_perf/hebel/valle.c3.txt b/messung_perf/hebel/valle.c3.txt new file mode 100644 index 00000000..fb37d63f --- /dev/null +++ b/messung_perf/hebel/valle.c3.txt @@ -0,0 +1,13 @@ +0 2.5 +1 2.5 +2 -2.5 +3 2.5 +4 2.5 +5 2.5 +6 -2.5 +7 2.5 +8 -5 +9 2.5 +10 2.5 +11 4.15 +fingerprint b3ac2b3a905a8ac8 calls 31464 diff --git a/messung_perf/hebel/valle.c3.txt.err b/messung_perf/hebel/valle.c3.txt.err new file mode 100644 index 00000000..f6fcb1c5 --- /dev/null +++ b/messung_perf/hebel/valle.c3.txt.err @@ -0,0 +1 @@ +18.25 s, 31464 engine calls, 0.580 ms/call diff --git a/messung_perf/hebel/vcgu1.1.txt b/messung_perf/hebel/vcgu1.1.txt new file mode 100644 index 00000000..fb37d63f --- /dev/null +++ b/messung_perf/hebel/vcgu1.1.txt @@ -0,0 +1,13 @@ +0 2.5 +1 2.5 +2 -2.5 +3 2.5 +4 2.5 +5 2.5 +6 -2.5 +7 2.5 +8 -5 +9 2.5 +10 2.5 +11 4.15 +fingerprint b3ac2b3a905a8ac8 calls 31464 diff --git a/messung_perf/hebel/vcgu1.1.txt.err b/messung_perf/hebel/vcgu1.1.txt.err new file mode 100644 index 00000000..a8a5964a --- /dev/null +++ b/messung_perf/hebel/vcgu1.1.txt.err @@ -0,0 +1 @@ +21.17 s, 31464 engine calls, 0.673 ms/call diff --git a/messung_perf/hebel/vcgu1.2.txt b/messung_perf/hebel/vcgu1.2.txt new file mode 100644 index 00000000..fb37d63f --- /dev/null +++ b/messung_perf/hebel/vcgu1.2.txt @@ -0,0 +1,13 @@ +0 2.5 +1 2.5 +2 -2.5 +3 2.5 +4 2.5 +5 2.5 +6 -2.5 +7 2.5 +8 -5 +9 2.5 +10 2.5 +11 4.15 +fingerprint b3ac2b3a905a8ac8 calls 31464 diff --git a/messung_perf/hebel/vcgu1.2.txt.err b/messung_perf/hebel/vcgu1.2.txt.err new file mode 100644 index 00000000..6aadbd00 --- /dev/null +++ b/messung_perf/hebel/vcgu1.2.txt.err @@ -0,0 +1 @@ +22.29 s, 31464 engine calls, 0.708 ms/call diff --git a/messung_perf/hebel/vcgu1.3.txt b/messung_perf/hebel/vcgu1.3.txt new file mode 100644 index 00000000..fb37d63f --- /dev/null +++ b/messung_perf/hebel/vcgu1.3.txt @@ -0,0 +1,13 @@ +0 2.5 +1 2.5 +2 -2.5 +3 2.5 +4 2.5 +5 2.5 +6 -2.5 +7 2.5 +8 -5 +9 2.5 +10 2.5 +11 4.15 +fingerprint b3ac2b3a905a8ac8 calls 31464 diff --git a/messung_perf/hebel/vcgu1.3.txt.err b/messung_perf/hebel/vcgu1.3.txt.err new file mode 100644 index 00000000..627fabb5 --- /dev/null +++ b/messung_perf/hebel/vcgu1.3.txt.err @@ -0,0 +1 @@ +19.98 s, 31464 engine calls, 0.635 ms/call diff --git a/messung_perf/hebel/vcgu1.c1.txt b/messung_perf/hebel/vcgu1.c1.txt new file mode 100644 index 00000000..fb37d63f --- /dev/null +++ b/messung_perf/hebel/vcgu1.c1.txt @@ -0,0 +1,13 @@ +0 2.5 +1 2.5 +2 -2.5 +3 2.5 +4 2.5 +5 2.5 +6 -2.5 +7 2.5 +8 -5 +9 2.5 +10 2.5 +11 4.15 +fingerprint b3ac2b3a905a8ac8 calls 31464 diff --git a/messung_perf/hebel/vcgu1.c1.txt.err b/messung_perf/hebel/vcgu1.c1.txt.err new file mode 100644 index 00000000..360deab3 --- /dev/null +++ b/messung_perf/hebel/vcgu1.c1.txt.err @@ -0,0 +1 @@ +19.99 s, 31464 engine calls, 0.635 ms/call diff --git a/messung_perf/hebel/vcgu1.c2.txt b/messung_perf/hebel/vcgu1.c2.txt new file mode 100644 index 00000000..fb37d63f --- /dev/null +++ b/messung_perf/hebel/vcgu1.c2.txt @@ -0,0 +1,13 @@ +0 2.5 +1 2.5 +2 -2.5 +3 2.5 +4 2.5 +5 2.5 +6 -2.5 +7 2.5 +8 -5 +9 2.5 +10 2.5 +11 4.15 +fingerprint b3ac2b3a905a8ac8 calls 31464 diff --git a/messung_perf/hebel/vcgu1.c2.txt.err b/messung_perf/hebel/vcgu1.c2.txt.err new file mode 100644 index 00000000..3788100b --- /dev/null +++ b/messung_perf/hebel/vcgu1.c2.txt.err @@ -0,0 +1 @@ +20.51 s, 31464 engine calls, 0.652 ms/call diff --git a/messung_perf/hebel/vcgu1.c3.txt b/messung_perf/hebel/vcgu1.c3.txt new file mode 100644 index 00000000..fb37d63f --- /dev/null +++ b/messung_perf/hebel/vcgu1.c3.txt @@ -0,0 +1,13 @@ +0 2.5 +1 2.5 +2 -2.5 +3 2.5 +4 2.5 +5 2.5 +6 -2.5 +7 2.5 +8 -5 +9 2.5 +10 2.5 +11 4.15 +fingerprint b3ac2b3a905a8ac8 calls 31464 diff --git a/messung_perf/hebel/vcgu1.c3.txt.err b/messung_perf/hebel/vcgu1.c3.txt.err new file mode 100644 index 00000000..b042c24e --- /dev/null +++ b/messung_perf/hebel/vcgu1.c3.txt.err @@ -0,0 +1 @@ +19.43 s, 31464 engine calls, 0.618 ms/call diff --git a/messung_perf/hebel/vlto.1.txt b/messung_perf/hebel/vlto.1.txt new file mode 100644 index 00000000..fb37d63f --- /dev/null +++ b/messung_perf/hebel/vlto.1.txt @@ -0,0 +1,13 @@ +0 2.5 +1 2.5 +2 -2.5 +3 2.5 +4 2.5 +5 2.5 +6 -2.5 +7 2.5 +8 -5 +9 2.5 +10 2.5 +11 4.15 +fingerprint b3ac2b3a905a8ac8 calls 31464 diff --git a/messung_perf/hebel/vlto.1.txt.err b/messung_perf/hebel/vlto.1.txt.err new file mode 100644 index 00000000..f54e2360 --- /dev/null +++ b/messung_perf/hebel/vlto.1.txt.err @@ -0,0 +1 @@ +23.15 s, 31464 engine calls, 0.736 ms/call diff --git a/messung_perf/hebel/vlto.2.txt b/messung_perf/hebel/vlto.2.txt new file mode 100644 index 00000000..fb37d63f --- /dev/null +++ b/messung_perf/hebel/vlto.2.txt @@ -0,0 +1,13 @@ +0 2.5 +1 2.5 +2 -2.5 +3 2.5 +4 2.5 +5 2.5 +6 -2.5 +7 2.5 +8 -5 +9 2.5 +10 2.5 +11 4.15 +fingerprint b3ac2b3a905a8ac8 calls 31464 diff --git a/messung_perf/hebel/vlto.2.txt.err b/messung_perf/hebel/vlto.2.txt.err new file mode 100644 index 00000000..8a1db048 --- /dev/null +++ b/messung_perf/hebel/vlto.2.txt.err @@ -0,0 +1 @@ +22.07 s, 31464 engine calls, 0.702 ms/call diff --git a/messung_perf/hebel/vlto.3.txt b/messung_perf/hebel/vlto.3.txt new file mode 100644 index 00000000..fb37d63f --- /dev/null +++ b/messung_perf/hebel/vlto.3.txt @@ -0,0 +1,13 @@ +0 2.5 +1 2.5 +2 -2.5 +3 2.5 +4 2.5 +5 2.5 +6 -2.5 +7 2.5 +8 -5 +9 2.5 +10 2.5 +11 4.15 +fingerprint b3ac2b3a905a8ac8 calls 31464 diff --git a/messung_perf/hebel/vlto.3.txt.err b/messung_perf/hebel/vlto.3.txt.err new file mode 100644 index 00000000..b703db3f --- /dev/null +++ b/messung_perf/hebel/vlto.3.txt.err @@ -0,0 +1 @@ +19.28 s, 31464 engine calls, 0.613 ms/call diff --git a/messung_perf/hebel/vlto.c1.txt b/messung_perf/hebel/vlto.c1.txt new file mode 100644 index 00000000..fb37d63f --- /dev/null +++ b/messung_perf/hebel/vlto.c1.txt @@ -0,0 +1,13 @@ +0 2.5 +1 2.5 +2 -2.5 +3 2.5 +4 2.5 +5 2.5 +6 -2.5 +7 2.5 +8 -5 +9 2.5 +10 2.5 +11 4.15 +fingerprint b3ac2b3a905a8ac8 calls 31464 diff --git a/messung_perf/hebel/vlto.c1.txt.err b/messung_perf/hebel/vlto.c1.txt.err new file mode 100644 index 00000000..5e4689f9 --- /dev/null +++ b/messung_perf/hebel/vlto.c1.txt.err @@ -0,0 +1 @@ +19.30 s, 31464 engine calls, 0.613 ms/call diff --git a/messung_perf/hebel/vlto.c2.txt b/messung_perf/hebel/vlto.c2.txt new file mode 100644 index 00000000..fb37d63f --- /dev/null +++ b/messung_perf/hebel/vlto.c2.txt @@ -0,0 +1,13 @@ +0 2.5 +1 2.5 +2 -2.5 +3 2.5 +4 2.5 +5 2.5 +6 -2.5 +7 2.5 +8 -5 +9 2.5 +10 2.5 +11 4.15 +fingerprint b3ac2b3a905a8ac8 calls 31464 diff --git a/messung_perf/hebel/vlto.c2.txt.err b/messung_perf/hebel/vlto.c2.txt.err new file mode 100644 index 00000000..cee82177 --- /dev/null +++ b/messung_perf/hebel/vlto.c2.txt.err @@ -0,0 +1 @@ +21.65 s, 31464 engine calls, 0.688 ms/call diff --git a/messung_perf/hebel/vlto.c3.txt b/messung_perf/hebel/vlto.c3.txt new file mode 100644 index 00000000..fb37d63f --- /dev/null +++ b/messung_perf/hebel/vlto.c3.txt @@ -0,0 +1,13 @@ +0 2.5 +1 2.5 +2 -2.5 +3 2.5 +4 2.5 +5 2.5 +6 -2.5 +7 2.5 +8 -5 +9 2.5 +10 2.5 +11 4.15 +fingerprint b3ac2b3a905a8ac8 calls 31464 diff --git a/messung_perf/hebel/vlto.c3.txt.err b/messung_perf/hebel/vlto.c3.txt.err new file mode 100644 index 00000000..fad4289f --- /dev/null +++ b/messung_perf/hebel/vlto.c3.txt.err @@ -0,0 +1 @@ +20.48 s, 31464 engine calls, 0.651 ms/call diff --git a/messung_perf/hebel/vnative.1.txt b/messung_perf/hebel/vnative.1.txt new file mode 100644 index 00000000..fb37d63f --- /dev/null +++ b/messung_perf/hebel/vnative.1.txt @@ -0,0 +1,13 @@ +0 2.5 +1 2.5 +2 -2.5 +3 2.5 +4 2.5 +5 2.5 +6 -2.5 +7 2.5 +8 -5 +9 2.5 +10 2.5 +11 4.15 +fingerprint b3ac2b3a905a8ac8 calls 31464 diff --git a/messung_perf/hebel/vnative.1.txt.err b/messung_perf/hebel/vnative.1.txt.err new file mode 100644 index 00000000..fb459196 --- /dev/null +++ b/messung_perf/hebel/vnative.1.txt.err @@ -0,0 +1 @@ +22.67 s, 31464 engine calls, 0.721 ms/call diff --git a/messung_perf/hebel/vnative.2.txt b/messung_perf/hebel/vnative.2.txt new file mode 100644 index 00000000..fb37d63f --- /dev/null +++ b/messung_perf/hebel/vnative.2.txt @@ -0,0 +1,13 @@ +0 2.5 +1 2.5 +2 -2.5 +3 2.5 +4 2.5 +5 2.5 +6 -2.5 +7 2.5 +8 -5 +9 2.5 +10 2.5 +11 4.15 +fingerprint b3ac2b3a905a8ac8 calls 31464 diff --git a/messung_perf/hebel/vnative.2.txt.err b/messung_perf/hebel/vnative.2.txt.err new file mode 100644 index 00000000..324b87b7 --- /dev/null +++ b/messung_perf/hebel/vnative.2.txt.err @@ -0,0 +1 @@ +19.82 s, 31464 engine calls, 0.630 ms/call diff --git a/messung_perf/hebel/vnative.3.txt b/messung_perf/hebel/vnative.3.txt new file mode 100644 index 00000000..fb37d63f --- /dev/null +++ b/messung_perf/hebel/vnative.3.txt @@ -0,0 +1,13 @@ +0 2.5 +1 2.5 +2 -2.5 +3 2.5 +4 2.5 +5 2.5 +6 -2.5 +7 2.5 +8 -5 +9 2.5 +10 2.5 +11 4.15 +fingerprint b3ac2b3a905a8ac8 calls 31464 diff --git a/messung_perf/hebel/vnative.3.txt.err b/messung_perf/hebel/vnative.3.txt.err new file mode 100644 index 00000000..179fc69b --- /dev/null +++ b/messung_perf/hebel/vnative.3.txt.err @@ -0,0 +1 @@ +17.47 s, 31464 engine calls, 0.555 ms/call diff --git a/messung_perf/hebel/vnative.c1.txt b/messung_perf/hebel/vnative.c1.txt new file mode 100644 index 00000000..fb37d63f --- /dev/null +++ b/messung_perf/hebel/vnative.c1.txt @@ -0,0 +1,13 @@ +0 2.5 +1 2.5 +2 -2.5 +3 2.5 +4 2.5 +5 2.5 +6 -2.5 +7 2.5 +8 -5 +9 2.5 +10 2.5 +11 4.15 +fingerprint b3ac2b3a905a8ac8 calls 31464 diff --git a/messung_perf/hebel/vnative.c1.txt.err b/messung_perf/hebel/vnative.c1.txt.err new file mode 100644 index 00000000..73d67953 --- /dev/null +++ b/messung_perf/hebel/vnative.c1.txt.err @@ -0,0 +1 @@ +18.40 s, 31464 engine calls, 0.585 ms/call diff --git a/messung_perf/hebel/vnative.c2.txt b/messung_perf/hebel/vnative.c2.txt new file mode 100644 index 00000000..fb37d63f --- /dev/null +++ b/messung_perf/hebel/vnative.c2.txt @@ -0,0 +1,13 @@ +0 2.5 +1 2.5 +2 -2.5 +3 2.5 +4 2.5 +5 2.5 +6 -2.5 +7 2.5 +8 -5 +9 2.5 +10 2.5 +11 4.15 +fingerprint b3ac2b3a905a8ac8 calls 31464 diff --git a/messung_perf/hebel/vnative.c2.txt.err b/messung_perf/hebel/vnative.c2.txt.err new file mode 100644 index 00000000..957e27e9 --- /dev/null +++ b/messung_perf/hebel/vnative.c2.txt.err @@ -0,0 +1 @@ +17.78 s, 31464 engine calls, 0.565 ms/call diff --git a/messung_perf/hebel/vnative.c3.txt b/messung_perf/hebel/vnative.c3.txt new file mode 100644 index 00000000..fb37d63f --- /dev/null +++ b/messung_perf/hebel/vnative.c3.txt @@ -0,0 +1,13 @@ +0 2.5 +1 2.5 +2 -2.5 +3 2.5 +4 2.5 +5 2.5 +6 -2.5 +7 2.5 +8 -5 +9 2.5 +10 2.5 +11 4.15 +fingerprint b3ac2b3a905a8ac8 calls 31464 diff --git a/messung_perf/hebel/vnative.c3.txt.err b/messung_perf/hebel/vnative.c3.txt.err new file mode 100644 index 00000000..6dea1411 --- /dev/null +++ b/messung_perf/hebel/vnative.c3.txt.err @@ -0,0 +1 @@ +18.84 s, 31464 engine calls, 0.599 ms/call diff --git a/messung_perf/live_solverlive2.time b/messung_perf/live_solverlive2.time new file mode 100644 index 00000000..3c641496 --- /dev/null +++ b/messung_perf/live_solverlive2.time @@ -0,0 +1 @@ +522.56 s cpu 511.47 s exit 0 diff --git a/messung_perf/live_solverlive2.txt b/messung_perf/live_solverlive2.txt new file mode 100644 index 00000000..2c2ef9a0 --- /dev/null +++ b/messung_perf/live_solverlive2.txt @@ -0,0 +1,2 @@ +reg +41.49 bb/100 samples 150 hash 67ab25f0bed6e09a +fingerprint 0000000000000000 calls 0 diff --git a/messung_perf/live_solverlive2.txt.err b/messung_perf/live_solverlive2.txt.err new file mode 100644 index 00000000..5e955af3 --- /dev/null +++ b/messung_perf/live_solverlive2.txt.err @@ -0,0 +1,7 @@ +live board=0 heuristik: n 237 p50 0.0 ms p99 0.0 ms max 0.0 ms +live board=3 flop-solver: n 150 p50 1815.5 ms p99 1839.3 ms max 1841.4 ms iters p50 115 min 60 +live board=3 heuristik: n 17 p50 1824.3 ms p99 1840.5 ms max 1840.5 ms +live board=4 heuristik: n 2 p50 1714.9 ms p99 1714.9 ms max 1714.9 ms +live board=4 turn-solver: n 108 p50 1709.9 ms p99 1726.9 ms max 1728.1 ms +live board=5 river-solver: n 65 p50 975.5 ms p99 1217.0 ms max 1238.9 ms iters p50 600 min 600 +521.57 s, 0 engine calls, 521566.255 ms/call diff --git a/messung_perf/live_solverlive7.time b/messung_perf/live_solverlive7.time new file mode 100644 index 00000000..75c83cca --- /dev/null +++ b/messung_perf/live_solverlive7.time @@ -0,0 +1 @@ +486.04 s cpu 475.55 s exit 0 diff --git a/messung_perf/live_solverlive7.txt b/messung_perf/live_solverlive7.txt new file mode 100644 index 00000000..f18424b8 --- /dev/null +++ b/messung_perf/live_solverlive7.txt @@ -0,0 +1,2 @@ +reg +61.35 bb/100 samples 150 hash caf7ba2111ad5391 +fingerprint 0000000000000000 calls 0 diff --git a/messung_perf/live_solverlive7.txt.err b/messung_perf/live_solverlive7.txt.err new file mode 100644 index 00000000..56a3df17 --- /dev/null +++ b/messung_perf/live_solverlive7.txt.err @@ -0,0 +1,5 @@ +live board=0 heuristik: n 237 p50 0.0 ms p99 0.0 ms max 0.1 ms +live board=3 flop-solver: n 164 p50 1665.3 ms p99 1827.3 ms max 1829.6 ms iters p50 200 min 130 +live board=4 turn-solver: n 114 p50 1583.0 ms p99 1726.1 ms max 1729.8 ms +live board=5 river-solver: n 71 p50 804.0 ms p99 1045.7 ms max 1510.4 ms iters p50 600 min 580 +485.05 s, 0 engine calls, 485052.679 ms/call diff --git a/messung_perf/n20_probe9.time b/messung_perf/n20_probe9.time new file mode 100644 index 00000000..37e0afe6 --- /dev/null +++ b/messung_perf/n20_probe9.time @@ -0,0 +1 @@ +24.57 s cpu 24.00 s exit 0 diff --git a/messung_perf/n20_probe9.txt b/messung_perf/n20_probe9.txt new file mode 100644 index 00000000..e87b0c64 --- /dev/null +++ b/messung_perf/n20_probe9.txt @@ -0,0 +1,21 @@ +0 2.5 +1 2.5 +2 -2.5 +3 2.5 +4 2.5 +5 2.5 +6 -2.5 +7 2.5 +8 -5 +9 2.5 +10 2.5 +11 4.15 +12 2.5 +13 100 +14 2.5 +15 -2.5 +16 -14.900000000000002 +17 -12.5 +18 -4.15 +19 100 +fingerprint 6c0a9a7645372cec calls 49212 diff --git a/messung_perf/n20_probe9.txt.err b/messung_perf/n20_probe9.txt.err new file mode 100644 index 00000000..1c0f15fa --- /dev/null +++ b/messung_perf/n20_probe9.txt.err @@ -0,0 +1,7 @@ +24.47 s, 49212 engine calls, 0.497 ms/call +zeit board=3 heuristik alle: n 37918 p50 0.54 ms p99 0.75 ms max 2.58 ms +zeit board=3 heuristik live: n 80 p50 1.46 ms p99 2.51 ms max 2.58 ms +zeit board=4 heuristik alle: n 7192 p50 0.51 ms p99 0.73 ms max 2.76 ms +zeit board=4 heuristik live: n 37 p50 1.62 ms p99 2.76 ms max 2.76 ms +zeit board=5 heuristik alle: n 4102 p50 0.43 ms p99 0.62 ms max 2.56 ms +zeit board=5 heuristik live: n 36 p50 1.16 ms p99 2.56 ms max 2.56 ms diff --git a/messung_perf/n20_probe9n.time b/messung_perf/n20_probe9n.time new file mode 100644 index 00000000..818812f9 --- /dev/null +++ b/messung_perf/n20_probe9n.time @@ -0,0 +1 @@ +22.18 s cpu 21.44 s exit 0 diff --git a/messung_perf/n20_probe9n.txt b/messung_perf/n20_probe9n.txt new file mode 100644 index 00000000..e87b0c64 --- /dev/null +++ b/messung_perf/n20_probe9n.txt @@ -0,0 +1,21 @@ +0 2.5 +1 2.5 +2 -2.5 +3 2.5 +4 2.5 +5 2.5 +6 -2.5 +7 2.5 +8 -5 +9 2.5 +10 2.5 +11 4.15 +12 2.5 +13 100 +14 2.5 +15 -2.5 +16 -14.900000000000002 +17 -12.5 +18 -4.15 +19 100 +fingerprint 6c0a9a7645372cec calls 49212 diff --git a/messung_perf/n20_probe9n.txt.err b/messung_perf/n20_probe9n.txt.err new file mode 100644 index 00000000..8c05adf1 --- /dev/null +++ b/messung_perf/n20_probe9n.txt.err @@ -0,0 +1,7 @@ +21.94 s, 49212 engine calls, 0.446 ms/call +zeit board=3 heuristik alle: n 37918 p50 0.47 ms p99 0.70 ms max 2.35 ms +zeit board=3 heuristik live: n 80 p50 1.28 ms p99 2.28 ms max 2.35 ms +zeit board=4 heuristik alle: n 7192 p50 0.44 ms p99 0.67 ms max 2.44 ms +zeit board=4 heuristik live: n 37 p50 1.47 ms p99 2.44 ms max 2.44 ms +zeit board=5 heuristik alle: n 4102 p50 0.32 ms p99 0.54 ms max 2.37 ms +zeit board=5 heuristik live: n 36 p50 1.08 ms p99 2.37 ms max 2.37 ms diff --git a/messung_perf/p1.time b/messung_perf/p1.time new file mode 100644 index 00000000..453157a9 --- /dev/null +++ b/messung_perf/p1.time @@ -0,0 +1 @@ +95.72 s exit diff --git a/messung_perf/p1.txt b/messung_perf/p1.txt new file mode 100644 index 00000000..b44b1960 --- /dev/null +++ b/messung_perf/p1.txt @@ -0,0 +1,7 @@ +0 2.5 +1 2.5 +2 -2.5 +3 2.5 +4 2.5 +5 2.5 +fingerprint 9754b5c8b2a54d12 calls 13119 diff --git a/messung_perf/p1.txt.err b/messung_perf/p1.txt.err new file mode 100644 index 00000000..751b7c2a --- /dev/null +++ b/messung_perf/p1.txt.err @@ -0,0 +1 @@ +95.45 s, 13119 engine calls, 7.275 ms/call diff --git a/messung_perf/p2.txt b/messung_perf/p2.txt new file mode 100644 index 00000000..b44b1960 --- /dev/null +++ b/messung_perf/p2.txt @@ -0,0 +1,7 @@ +0 2.5 +1 2.5 +2 -2.5 +3 2.5 +4 2.5 +5 2.5 +fingerprint 9754b5c8b2a54d12 calls 13119 diff --git a/messung_perf/p2.txt.err b/messung_perf/p2.txt.err new file mode 100644 index 00000000..291b4997 --- /dev/null +++ b/messung_perf/p2.txt.err @@ -0,0 +1 @@ +40.88 s, 13119 engine calls, 3.116 ms/call diff --git a/messung_perf/p2b.time b/messung_perf/p2b.time new file mode 100644 index 00000000..40807a33 --- /dev/null +++ b/messung_perf/p2b.time @@ -0,0 +1 @@ +40.21 s exit diff --git a/messung_perf/p2b.txt b/messung_perf/p2b.txt new file mode 100644 index 00000000..b44b1960 --- /dev/null +++ b/messung_perf/p2b.txt @@ -0,0 +1,7 @@ +0 2.5 +1 2.5 +2 -2.5 +3 2.5 +4 2.5 +5 2.5 +fingerprint 9754b5c8b2a54d12 calls 13119 diff --git a/messung_perf/p2b.txt.err b/messung_perf/p2b.txt.err new file mode 100644 index 00000000..d366e776 --- /dev/null +++ b/messung_perf/p2b.txt.err @@ -0,0 +1 @@ +40.10 s, 13119 engine calls, 3.057 ms/call diff --git a/messung_perf/p3.txt b/messung_perf/p3.txt new file mode 100644 index 00000000..b44b1960 --- /dev/null +++ b/messung_perf/p3.txt @@ -0,0 +1,7 @@ +0 2.5 +1 2.5 +2 -2.5 +3 2.5 +4 2.5 +5 2.5 +fingerprint 9754b5c8b2a54d12 calls 13119 diff --git a/messung_perf/p3.txt.err b/messung_perf/p3.txt.err new file mode 100644 index 00000000..e92dadf9 --- /dev/null +++ b/messung_perf/p3.txt.err @@ -0,0 +1 @@ +24.47 s, 13119 engine calls, 1.865 ms/call diff --git a/messung_perf/p3b.time b/messung_perf/p3b.time new file mode 100644 index 00000000..534a110e --- /dev/null +++ b/messung_perf/p3b.time @@ -0,0 +1 @@ +23.26 s exit diff --git a/messung_perf/p3b.txt b/messung_perf/p3b.txt new file mode 100644 index 00000000..b44b1960 --- /dev/null +++ b/messung_perf/p3b.txt @@ -0,0 +1,7 @@ +0 2.5 +1 2.5 +2 -2.5 +3 2.5 +4 2.5 +5 2.5 +fingerprint 9754b5c8b2a54d12 calls 13119 diff --git a/messung_perf/p3b.txt.err b/messung_perf/p3b.txt.err new file mode 100644 index 00000000..e9cfc295 --- /dev/null +++ b/messung_perf/p3b.txt.err @@ -0,0 +1 @@ +23.17 s, 13119 engine calls, 1.766 ms/call diff --git a/messung_perf/p4.txt b/messung_perf/p4.txt new file mode 100644 index 00000000..b44b1960 --- /dev/null +++ b/messung_perf/p4.txt @@ -0,0 +1,7 @@ +0 2.5 +1 2.5 +2 -2.5 +3 2.5 +4 2.5 +5 2.5 +fingerprint 9754b5c8b2a54d12 calls 13119 diff --git a/messung_perf/p4.txt.err b/messung_perf/p4.txt.err new file mode 100644 index 00000000..c86baeae --- /dev/null +++ b/messung_perf/p4.txt.err @@ -0,0 +1 @@ +12.17 s, 13119 engine calls, 0.928 ms/call diff --git a/messung_perf/p4b.time b/messung_perf/p4b.time new file mode 100644 index 00000000..a7a00786 --- /dev/null +++ b/messung_perf/p4b.time @@ -0,0 +1 @@ +28.67 s exit diff --git a/messung_perf/p4b.txt b/messung_perf/p4b.txt new file mode 100644 index 00000000..fb37d63f --- /dev/null +++ b/messung_perf/p4b.txt @@ -0,0 +1,13 @@ +0 2.5 +1 2.5 +2 -2.5 +3 2.5 +4 2.5 +5 2.5 +6 -2.5 +7 2.5 +8 -5 +9 2.5 +10 2.5 +11 4.15 +fingerprint b3ac2b3a905a8ac8 calls 31464 diff --git a/messung_perf/p4b.txt.err b/messung_perf/p4b.txt.err new file mode 100644 index 00000000..93bccf38 --- /dev/null +++ b/messung_perf/p4b.txt.err @@ -0,0 +1 @@ +28.59 s, 31464 engine calls, 0.909 ms/call diff --git a/messung_perf/p5.txt b/messung_perf/p5.txt new file mode 100644 index 00000000..fb37d63f --- /dev/null +++ b/messung_perf/p5.txt @@ -0,0 +1,13 @@ +0 2.5 +1 2.5 +2 -2.5 +3 2.5 +4 2.5 +5 2.5 +6 -2.5 +7 2.5 +8 -5 +9 2.5 +10 2.5 +11 4.15 +fingerprint b3ac2b3a905a8ac8 calls 31464 diff --git a/messung_perf/p5.txt.err b/messung_perf/p5.txt.err new file mode 100644 index 00000000..8eaacf32 --- /dev/null +++ b/messung_perf/p5.txt.err @@ -0,0 +1 @@ +20.84 s, 31464 engine calls, 0.662 ms/call diff --git a/messung_perf/p6_20.time b/messung_perf/p6_20.time new file mode 100644 index 00000000..7f26a805 --- /dev/null +++ b/messung_perf/p6_20.time @@ -0,0 +1 @@ +34.69 s cpu 27.22 s exit diff --git a/messung_perf/p6_20.txt b/messung_perf/p6_20.txt new file mode 100644 index 00000000..e87b0c64 --- /dev/null +++ b/messung_perf/p6_20.txt @@ -0,0 +1,21 @@ +0 2.5 +1 2.5 +2 -2.5 +3 2.5 +4 2.5 +5 2.5 +6 -2.5 +7 2.5 +8 -5 +9 2.5 +10 2.5 +11 4.15 +12 2.5 +13 100 +14 2.5 +15 -2.5 +16 -14.900000000000002 +17 -12.5 +18 -4.15 +19 100 +fingerprint 6c0a9a7645372cec calls 49212 diff --git a/messung_perf/p6_20.txt.err b/messung_perf/p6_20.txt.err new file mode 100644 index 00000000..f0b5ac5e --- /dev/null +++ b/messung_perf/p6_20.txt.err @@ -0,0 +1 @@ +34.59 s, 49212 engine calls, 0.703 ms/call diff --git a/messung_perf/p8_20.txt b/messung_perf/p8_20.txt new file mode 100644 index 00000000..e87b0c64 --- /dev/null +++ b/messung_perf/p8_20.txt @@ -0,0 +1,21 @@ +0 2.5 +1 2.5 +2 -2.5 +3 2.5 +4 2.5 +5 2.5 +6 -2.5 +7 2.5 +8 -5 +9 2.5 +10 2.5 +11 4.15 +12 2.5 +13 100 +14 2.5 +15 -2.5 +16 -14.900000000000002 +17 -12.5 +18 -4.15 +19 100 +fingerprint 6c0a9a7645372cec calls 49212 diff --git a/messung_perf/p8_20.txt.err b/messung_perf/p8_20.txt.err new file mode 100644 index 00000000..6d8db4f3 --- /dev/null +++ b/messung_perf/p8_20.txt.err @@ -0,0 +1,7 @@ +28.96 s, 49212 engine calls, 0.589 ms/call +zeit board=3 heuristik alle: n 37918 p50 0.63 ms p99 1.37 ms max 10.84 ms +zeit board=3 heuristik live: n 80 p50 1.84 ms p99 2.75 ms max 3.21 ms +zeit board=4 heuristik alle: n 7192 p50 0.61 ms p99 1.27 ms max 3.20 ms +zeit board=4 heuristik live: n 37 p50 1.82 ms p99 3.20 ms max 3.20 ms +zeit board=5 heuristik alle: n 4102 p50 0.51 ms p99 1.30 ms max 2.66 ms +zeit board=5 heuristik live: n 36 p50 1.35 ms p99 2.66 ms max 2.66 ms diff --git a/messung_perf/prof0.out.err b/messung_perf/prof0.out.err new file mode 100644 index 00000000..a6fd7ff5 --- /dev/null +++ b/messung_perf/prof0.out.err @@ -0,0 +1,2 @@ +82.80 s, 3749 engine calls, 22.085 ms/call +53640 samples -> messung_perf/prof0.txt diff --git a/messung_perf/prof0.report.txt b/messung_perf/prof0.report.txt new file mode 100644 index 00000000..588b7048 --- /dev/null +++ b/messung_perf/prof0.report.txt @@ -0,0 +1,127 @@ +53640 samples + +== self (innermost function) == + 12.52% groups_by_weight + 12.15% ?? + 7.99% count_ones + 5.80% rank_counts + 3.79% for_each + 3.67% eq + 3.63% checked_shl + 3.54% insert_tail<(u8, u8), alloc::slice::{impl#0}::sort_by::{closure_env#0}<(u8, u8), rechner::hand::five::groups_by_weight::{closure_env#0}>> + 2.97% try_fold, (), core::iter::adapters::enumerate::{impl#1}::try_fold::enumerate::{closure_env#0}<&rechner::card::playing_card::Card, (), core::ops::control_flow::ControlFlow<>, core::iter::traits::iterator::Iterator::find::check::{closure_env#0}<(usize, &rechner::card::playing_card::Card), &mut rechner::hand::subset::pick::{closure_env#0}<>>>, core::ops::control_flow::ControlFlow<>> + 2.70% eq + 2.38% evaluate_in + 2.38% compare + 2.17% {closure#0} + 1.96% first + 1.73% {closure#0} core::cmp::Ordering>>> + 1.64% lt + 1.45% {closure#1} + 1.32% spec_next + 1.31% next>, rechner::hand::subset::pick::{closure_env#0}<>>, rechner::hand::subset::pick::{closure_env#1}<>> + 1.27% next + 1.05% straight_high + 1.00% add + 0.98% spec_try_fold, core::ops::try_trait::NeverShortCircuit<>> + 0.97% copy_nonoverlapping<(u8, u8)> + 0.95% new + 0.88% {closure#0} core::cmp::Ordering>>>> + 0.81% stable_sort<(u8, u8), alloc::slice::{impl#0}::sort_by::{closure_env#0}<(u8, u8), rechner::hand::five::groups_by_weight::{closure_env#0}>> + 0.80% spec_try_fold, rechner::read::windows::windows::{closure_env#0}, core::iter::traits::iterator::Iterator::any::check::{closure_env#0}<>>, core::ops::control_flow::ControlFlow<>> + 0.71% unchecked_add + 0.69% {closure#0}<&rechner::card::playing_card::Card, (), core::ops::control_flow::ControlFlow<>, core::iter::traits::iterator::Iterator::find::check::{closure_env#0}<(usize, &rechner::card::playing_card::Card), &mut rechner::hand::subset::pick::{closure_env#0}<>>> + +== self by line == + 10.63% ?? @??:0 + 8.14% groups_by_weight @five.rs:51 + 7.99% count_ones @uint_macros.rs:85 + 3.92% rank_counts @five.rs:39 + 3.79% for_each @macros.rs:296 + 3.63% checked_shl @uint_macros.rs:2030 + 3.07% insert_tail<(u8, u8), alloc::slice::{impl#0}::sort_by::{closure_env#0}<(u8, u8), rechner::hand::five::groups_by_weight::{closure_env#0}>> @smallsort.rs:541 + 2.71% groups_by_weight @five.rs:50 + 2.70% eq @non_null.rs:1663 + 2.38% compare @cmp.rs:339 + 2.36% eq @cmp.rs:410 + 1.96% first @mod.rs:156 + 1.88% rank_counts @five.rs:41 + 1.73% {closure#0} core::cmp::Ordering>>> @filter_map.rs:40 + 1.63% lt @cmp.rs:2144 + 1.54% try_fold, (), core::iter::adapters::enumerate::{impl#1}::try_fold::enumerate::{closure_env#0}<&rechner::card::playing_card::Card, (), core::ops::control_flow::ControlFlow<>, core::iter::traits::iterator::Iterator::find::check::{closure_env#0}<(usize, &rechner::card::playing_card::Card), &mut rechner::hand::subset::pick::{closure_env#0}<>>>, core::ops::control_flow::ControlFlow<>> @iterator.rs:2490 + 1.37% {closure#1} @showdown.rs:51 + 1.31% next>, rechner::hand::subset::pick::{closure_env#0}<>>, rechner::hand::subset::pick::{closure_env#1}<>> @map.rs:107 + 1.14% try_fold, (), core::iter::adapters::enumerate::{impl#1}::try_fold::enumerate::{closure_env#0}<&rechner::card::playing_card::Card, (), core::ops::control_flow::ControlFlow<>, core::iter::traits::iterator::Iterator::find::check::{closure_env#0}<(usize, &rechner::card::playing_card::Card), &mut rechner::hand::subset::pick::{closure_env#0}<>>>, core::ops::control_flow::ControlFlow<>> @macros.rs:? + 1.04% {closure#0} @subset.rs:7 + 1.04% ?? @showdown.rs:84 + 0.97% copy_nonoverlapping<(u8, u8)> @mod.rs:573 + 0.96% add @non_null.rs:627 + 0.95% new @strength.rs:18 + 0.91% spec_next @cmp.rs:? + 0.81% next @macros.rs:180 + 0.78% evaluate_in @five.rs:36 + 0.77% evaluate_in @five.rs:14 + 0.76% spec_try_fold, core::ops::try_trait::NeverShortCircuit<>> @range.rs:1479 + 0.73% eq @suit.rs:1 + +== inclusive == +100.00% std::rt::lang_start_internal +100.00% __rust_begin_short_backtrace +100.00% std::panicking::catch_unwind::do_call:: +100.00% std::panic::catch_unwind::<&dyn core::ops::function::Fn<> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe, i32> +100.00% ?? +100.00% <&dyn core::ops::function::Fn<> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe as core::ops::function::FnOnce<>>::call_once +100.00% std::rt::lang_start_internal::{closure#0} +100.00% std::panic::catch_unwind:: +100.00% std::panicking::catch_unwind::do_call::<&dyn core::ops::function::Fn<> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe, i32> +100.00% main +100.00% std::panicking::catch_unwind:: +100.00% call_once +100.00% std::panicking::catch_unwind:: + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe> + 99.99% hand + 99.99% lbr_hand + 99.99% {closure#0} + 99.99% or_insert_with<(usize, usize), alloc::vec::Vec<>, alloc::alloc::Global, rechner::blueprint::lbr::hand::{closure#0}::{closure_env#0}<>> + 99.99% or_try_insert_with<(usize, usize), alloc::vec::Vec<>, alloc::alloc::Global, std::collections::hash::map::{impl#72}::or_insert_with::{closure_env#0}<(usize, usize), alloc::vec::Vec<>, alloc::alloc::Global, rechner::blueprint::lbr::hand::{closure#0}::{closure_env#0}<>>, !> + 99.98% zeile + 99.98% {closure#0}<(usize, usize), alloc::vec::Vec<>, alloc::alloc::Global, rechner::blueprint::lbr::hand::{closure#0}::{closure_env#0}<>> + 99.97% {closure#0} + 99.94% zeile_und_entscheidung + 99.93% and_then<(rechner::game::spot::Spot, f64), usize, rechner::blueprint::engine_gegner::{impl#2}::zeile_und_entscheidung::{closure_env#0}> + 99.92% decide + 99.92% decide_with + 99.90% think + 99.90% postflop + 81.69% estimate + 81.64% try_fold, (rechner::equity::tally::Tally, rechner::rng::split_mix::Rng), rechner::equity::monte_carlo::estimate::{closure_env#0}, core::result::Result<>> + 81.61% play_trial + 79.38% judge + 74.80% {closure#1} + 72.84% select + 70.40% best_of_all + 67.47% reduce, rechner::hand::subset::masks::{closure_env#0}>, rechner::hand::showdown::best_of_all::{closure_env#0}>, rechner::hand::showdown::best_of_all::{closure_env#1}>, core::iter::traits::iterator::Iterator::max_by::fold::{closure_env#0}<> core::cmp::Ordering>> + 67.47% max, rechner::hand::subset::masks::{closure_env#0}>, rechner::hand::showdown::best_of_all::{closure_env#0}>, rechner::hand::showdown::best_of_all::{closure_env#1}>> + 67.47% max_by, rechner::hand::subset::masks::{closure_env#0}>, rechner::hand::showdown::best_of_all::{closure_env#0}>, rechner::hand::showdown::best_of_all::{closure_env#1}>, fn(&rechner::hand::strength::Strength, &rechner::hand::strength::Strength) -> core::cmp::Ordering> + 60.82% fold, rechner::hand::subset::masks::{closure_env#0}>, rechner::hand::showdown::best_of_all::{closure_env#0}>, rechner::hand::showdown::best_of_all::{closure_env#1}, rechner::hand::strength::Strength, core::iter::traits::iterator::Iterator::max_by::fold::{closure_env#0}<> core::cmp::Ordering>> + 60.51% fold<[rechner::card::playing_card::Card; 5], core::iter::adapters::filter::Filter, rechner::hand::subset::masks::{closure_env#0}>, rechner::hand::showdown::best_of_all::{closure_env#0}, rechner::hand::strength::Strength, core::iter::adapters::map::map_fold::{closure_env#0}<[rechner::card::playing_card::Card; 5], rechner::hand::strength::Strength, rechner::hand::strength::Strength, rechner::hand::showdown::best_of_all::{closure_env#1}, core::iter::traits::iterator::Iterator::max_by::fold::{closure_env#0}<> core::cmp::Ordering>>> + 60.50% fold, rechner::hand::subset::masks::{closure_env#0}, rechner::hand::strength::Strength, core::iter::adapters::filter_map::filter_map_fold::{closure_env#0} core::cmp::Ordering>>>> + 60.50% fold, rechner::hand::strength::Strength, core::iter::adapters::filter::filter_fold::{closure_env#0} core::cmp::Ordering>>>>> + 59.04% {closure#0} core::cmp::Ordering>>>> + 52.22% {closure#0} core::cmp::Ordering>>> + 46.44% called_equity + 46.43% fold<(f64, i32, f64), alloc::vec::Vec<(i32, core::option::Option<>), alloc::alloc::Global>, rechner::engine::called_equity::called_equity::{closure_env#1}> + 46.43% simulate + 40.59% {closure#0}<[rechner::card::playing_card::Card; 5], rechner::hand::strength::Strength, rechner::hand::strength::Strength, rechner::hand::showdown::best_of_all::{closure_env#1}, core::iter::traits::iterator::Iterator::max_by::fold::{closure_env#0}<> core::cmp::Ordering>> + 36.80% evaluate_in + 20.73% groups_by_weight + 14.49% meets + 14.46% glance + 10.18% rank_counts + 9.88% draw_of + 9.56% range_filter + 9.55% pick<5> + 9.54% acceptances + 8.94% completing_ranks + 8.89% sum, rechner::read::straight_draw::completing_ranks::{closure_env#0}>, core::iter::adapters::filter::{impl#3}::count::to_usize::{closure_env#0}<>>, usize> + 8.89% fold, rechner::read::straight_draw::completing_ranks::{closure_env#0}>, core::iter::adapters::filter::{impl#3}::count::to_usize::{closure_env#0}<>, usize, core::iter::traits::accum::{impl#48}::sum::{closure_env#0}, rechner::read::straight_draw::completing_ranks::{closure_env#0}>, core::iter::adapters::filter::{impl#3}::count::to_usize::{closure_env#0}<>>>> + 8.89% count, rechner::read::straight_draw::completing_ranks::{closure_env#0}>, rechner::read::straight_draw::completing_ranks::{closure_env#1}> diff --git a/messung_perf/prof0.time b/messung_perf/prof0.time new file mode 100644 index 00000000..4577b9d8 --- /dev/null +++ b/messung_perf/prof0.time @@ -0,0 +1 @@ +83.20 s exit diff --git a/messung_perf/prof2.out.err b/messung_perf/prof2.out.err new file mode 100644 index 00000000..8dadffb2 --- /dev/null +++ b/messung_perf/prof2.out.err @@ -0,0 +1,2 @@ +38.52 s, 13119 engine calls, 2.936 ms/call +24998 samples -> messung_perf/prof2.txt diff --git a/messung_perf/prof2.report.txt b/messung_perf/prof2.report.txt new file mode 100644 index 00000000..e3635021 --- /dev/null +++ b/messung_perf/prof2.report.txt @@ -0,0 +1,127 @@ +24998 samples + +== self (innermost function) == + 34.01% ?? + 7.50% eq + 7.36% add + 6.79% eq + 4.70% best_standard, core::slice::iter::Iter<>>>> + 4.64% position + 3.33% next + 2.88% any> + 2.80% deal_combo + 2.33% count_ones + 2.21% all + 1.52% play_trial + 0.99% from_iter, core::slice::iter::Iter<>>>> + 0.81% copied + 0.77% {closure#2}, core::slice::iter::Iter<>>>> + 0.64% judge + 0.62% fold, core::slice::iter::Iter<>, (), core::iter::adapters::copied::copy_fold::{closure_env#0}, core::slice::iter::Iter<>>>>>>> + 0.57% swap + 0.56% std::sys::alloc::windows::allocate + 0.52% next_u64 + 0.47% std::sys::alloc::windows::process_heap_alloc + 0.47% fold, core::slice::iter::Iter<>>>>>>> + 0.46% {closure#1}, core::slice::iter::Iter<>>>> + 0.46% offset_from_unsigned + 0.41% {closure#0}<&rechner::card::playing_card::Card, (), core::ops::control_flow::ControlFlow<>, core::iter::traits::iterator::Iterator::any::check::{closure_env#0}<>> + 0.39% leading_zeros + 0.36% best_of_all_standard + 0.35% branch + 0.34% fold, core::slice::iter::Iter<>>>>>>> + 0.34% __rustc::__rdl_dealloc + +== self by line == + 32.27% ?? @??:0 + 7.19% add @non_null.rs:627 + 6.79% eq @non_null.rs:1663 + 4.34% eq @rank.rs:1 + 3.12% eq @suit.rs:1 + 2.91% next @macros.rs:? + 2.88% any> @macros.rs:327 + 2.33% count_ones @uint_macros.rs:85 + 2.21% all @macros.rs:? + 2.19% position @macros.rs:385 + 2.17% position @macros.rs:379 + 2.10% best_standard, core::slice::iter::Iter<>>>> @showdown.rs:51 + 0.94% deal_combo @macros.rs:? + 0.84% ?? @perf_probe.b1ab846a04ee54aa-cgu.3:? + 0.81% copied @option.rs:2138 + 0.78% ?? @compiler_builtins.d282ed2a3a00e583-cgu.205:? + 0.78% deal_combo @sample.rs:? + 0.56% std::sys::alloc::windows::allocate @windows.rs:131 + 0.46% {closure#1}, core::slice::iter::Iter<>>>> @uint_macros.rs:154 + 0.46% offset_from_unsigned @const_ptr.rs:733 + 0.45% best_standard, core::slice::iter::Iter<>>>> @showdown.rs:117 + 0.44% best_standard, core::slice::iter::Iter<>>>> @showdown.rs:123 + 0.43% deal_combo @sample.rs:54 + 0.42% next @macros.rs:180 + 0.41% swap @mod.rs:910 + 0.41% {closure#0}<&rechner::card::playing_card::Card, (), core::ops::control_flow::ControlFlow<>, core::iter::traits::iterator::Iterator::any::check::{closure_env#0}<>> @enumerate.rs:120 + 0.39% leading_zeros @uint_macros.rs:154 + 0.34% from_iter, core::slice::iter::Iter<>>>> @spec_from_iter_nested.rs:62 + 0.34% from_iter, core::slice::iter::Iter<>>>> @spec_from_iter_nested.rs:50 + 0.34% __rustc::__rdl_dealloc @alloc.rs:477 + +== inclusive == +100.00% ?? +100.00% main +100.00% std::panicking::catch_unwind::do_call::<&dyn core::ops::function::Fn<> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe, i32> +100.00% std::panic::catch_unwind:: +100.00% <&dyn core::ops::function::Fn<> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe as core::ops::function::FnOnce<>>::call_once +100.00% std::rt::lang_start_internal::{closure#0} +100.00% std::panicking::catch_unwind:: +100.00% std::rt::lang_start_internal +100.00% std::panicking::catch_unwind:: + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe> +100.00% std::panic::catch_unwind::<&dyn core::ops::function::Fn<> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe, i32> +100.00% call_once +100.00% __rust_begin_short_backtrace +100.00% std::panicking::catch_unwind::do_call:: + 99.98% lbr_hand + 99.98% hand + 99.95% {closure#0} + 99.94% or_try_insert_with<(usize, usize), alloc::vec::Vec<>, alloc::alloc::Global, std::collections::hash::map::{impl#72}::or_insert_with::{closure_env#0}<(usize, usize), alloc::vec::Vec<>, alloc::alloc::Global, rechner::blueprint::lbr::hand::{closure#0}::{closure_env#0}<>>, !> + 99.94% or_insert_with<(usize, usize), alloc::vec::Vec<>, alloc::alloc::Global, rechner::blueprint::lbr::hand::{closure#0}::{closure_env#0}<>> + 99.93% {closure#0}<(usize, usize), alloc::vec::Vec<>, alloc::alloc::Global, rechner::blueprint::lbr::hand::{closure#0}::{closure_env#0}<>> + 99.93% zeile + 99.80% {closure#0} + 99.74% zeile_und_entscheidung + 99.65% and_then<(rechner::game::spot::Spot, f64), usize, rechner::blueprint::engine_gegner::{impl#2}::zeile_und_entscheidung::{closure_env#0}> + 99.61% decide + 99.61% decide_with + 99.52% think + 99.49% postflop + 90.62% estimate + 90.44% try_fold, (rechner::equity::tally::Tally, rechner::rng::split_mix::Rng), rechner::equity::monte_carlo::estimate::{closure_env#0}, core::result::Result<>> + 90.26% play_trial + 49.20% {closure#1} + 46.44% judge + 44.22% called_equity + 44.17% fold<(f64, i32, f64), alloc::vec::Vec<(i32, core::option::Option<>), alloc::alloc::Global>, rechner::engine::called_equity::called_equity::{closure_env#1}> + 44.16% simulate + 33.49% distinct + 30.45% deal_combo + 20.59% alloc_impl + 20.59% alloc_impl_runtime + 20.58% allocate + 20.58% alloc + 18.07% try_allocate_in + 18.06% with_capacity_in + 17.88% any> + 17.88% contains + 17.88% slice_contains + 17.23% next + 16.75% collect, core::slice::iter::Iter<>>>, alloc::vec::Vec<>> + 16.75% from_iter, core::slice::iter::Iter<>>>> + 14.51% deallocate + 14.37% deallocate + 14.36% deallocate_impl_runtime + 14.36% dealloc_nonnull + 14.36% deallocate_impl + 14.06% all + 12.87% with_capacity_in + 12.86% with_capacity + 12.14% position + 11.17% best_of_all_standard + 10.86% drop_glue> diff --git a/messung_perf/prof3.out.err b/messung_perf/prof3.out.err new file mode 100644 index 00000000..894a0357 --- /dev/null +++ b/messung_perf/prof3.out.err @@ -0,0 +1,2 @@ +21.47 s, 13119 engine calls, 1.637 ms/call +14095 samples -> messung_perf/prof3.txt diff --git a/messung_perf/prof3.report.txt b/messung_perf/prof3.report.txt new file mode 100644 index 00000000..ccaf0f22 --- /dev/null +++ b/messung_perf/prof3.report.txt @@ -0,0 +1,107 @@ +14095 samples + +== self (innermost function) == + 24.48% ?? + 8.56% best_standard, core::slice::iter::Iter<>>>> + 8.33% eq + 6.26% position + 5.77% index + 4.70% deal_combo + 4.31% eq + 3.85% count_ones + 2.37% play_trial + 2.27% {closure#0} + 2.24% add + 2.03% leading_zeros + 1.75% distinct + 1.65% judge + 1.55% next, core::slice::iter::Iter<>>, rechner::card::playing_card::Card> + 1.23% {closure#2}, core::slice::iter::Iter<>>>> + 1.11% fold + 1.06% next_u64 + 1.05% swap + 0.77% unchecked_add + 0.72% {closure#3}, core::slice::iter::Iter<>>>> + 0.66% as_mut> + 0.59% compare + 0.57% {closure#1} + 0.55% is_ge + +== self by line == + 23.37% ?? @??:0 + 5.77% index @playing_card.rs:16 + 5.57% eq @suit.rs:1 + 4.31% eq @non_null.rs:1663 + 3.85% count_ones @uint_macros.rs:85 + 3.51% best_standard, core::slice::iter::Iter<>>>> @showdown.rs:57 + 2.92% position @macros.rs:385 + 2.80% position @macros.rs:379 + 2.70% eq @rank.rs:1 + 2.03% leading_zeros @uint_macros.rs:154 + 1.97% add @non_null.rs:627 + 1.95% {closure#0} @sample.rs:41 + 1.67% deal_combo @sample.rs:? + 1.48% distinct @showdown.rs:40 + 1.39% deal_combo @macros.rs:? + 1.33% next, core::slice::iter::Iter<>>, rechner::card::playing_card::Card> @option.rs:2138 + 0.77% unchecked_add @uint_macros.rs:1013 + 0.73% best_standard, core::slice::iter::Iter<>>>> @showdown.rs:129 + 0.68% swap @mod.rs:910 + 0.66% as_mut> @option.rs:765 + 0.65% judge @showdown.rs:192 + 0.61% best_standard, core::slice::iter::Iter<>>>> @showdown.rs:123 + 0.59% compare @cmp.rs:339 + 0.57% judge @showdown.rs:202 + 0.55% is_ge @cmp.rs:551 + +== inclusive == +100.00% std::panicking::catch_unwind:: + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe> +100.00% call_once +100.00% main +100.00% std::panic::catch_unwind:: +100.00% std::panicking::catch_unwind:: +100.00% ?? +100.00% std::rt::lang_start_internal::{closure#0} +100.00% std::panic::catch_unwind::<&dyn core::ops::function::Fn<> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe, i32> +100.00% __rust_begin_short_backtrace +100.00% std::rt::lang_start_internal +100.00% <&dyn core::ops::function::Fn<> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe as core::ops::function::FnOnce<>>::call_once +100.00% std::panicking::catch_unwind::do_call:: +100.00% std::panicking::catch_unwind::do_call::<&dyn core::ops::function::Fn<> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe, i32> + 99.96% hand + 99.96% lbr_hand + 99.92% {closure#0} + 99.87% or_try_insert_with<(usize, usize), alloc::vec::Vec<>, alloc::alloc::Global, std::collections::hash::map::{impl#72}::or_insert_with::{closure_env#0}<(usize, usize), alloc::vec::Vec<>, alloc::alloc::Global, rechner::blueprint::lbr::hand::{closure#0}::{closure_env#0}<>>, !> + 99.87% or_insert_with<(usize, usize), alloc::vec::Vec<>, alloc::alloc::Global, rechner::blueprint::lbr::hand::{closure#0}::{closure_env#0}<>> + 99.87% {closure#0}<(usize, usize), alloc::vec::Vec<>, alloc::alloc::Global, rechner::blueprint::lbr::hand::{closure#0}::{closure_env#0}<>> + 99.86% zeile + 99.64% {closure#0} + 99.60% zeile_und_entscheidung + 99.40% and_then<(rechner::game::spot::Spot, f64), usize, rechner::blueprint::engine_gegner::{impl#2}::zeile_und_entscheidung::{closure_env#0}> + 99.38% decide_with + 99.38% decide + 99.23% think + 99.21% postflop + 85.08% estimate + 84.81% try_fold, (rechner::equity::tally::Tally, rechner::rng::split_mix::Rng), rechner::equity::monte_carlo::estimate::{closure_env#0}, core::result::Result<>> + 84.53% play_trial + 49.12% {closure#1} + 45.00% called_equity + 44.96% simulate + 44.96% fold<(f64, i32, f64), alloc::vec::Vec<(i32, core::option::Option<>), alloc::alloc::Global>, rechner::engine::called_equity::called_equity::{closure_env#1}> + 32.34% deal_combo + 29.93% judge + 20.04% best_of_all_standard + 19.18% best_standard, core::slice::iter::Iter<>>>> + 17.84% position + 14.79% alloc_impl_runtime + 14.79% alloc_impl + 14.78% alloc + 14.78% allocate + 10.93% from_iter, alloc::alloc::Global>>, core::iter::adapters::map::Map, alloc::alloc::Global>>, rechner::engine::called_equity::simulate::{closure_env#1}>> + 10.90% for_each, alloc::alloc::Global>>, rechner::engine::called_equity::simulate::{closure_env#1}>, alloc::vec::{impl#22}::extend_trusted::{closure_env#0}, alloc::alloc::Global>>, alloc::alloc::Global, core::iter::adapters::map::Map, alloc::alloc::Global>>, rechner::engine::called_equity::simulate::{closure_env#1}>>> + 10.90% fold, alloc::alloc::Global>, (), core::iter::adapters::map::map_fold::{closure_env#0}<&alloc::boxed::Box, alloc::alloc::Global>, core::option::Option, alloc::alloc::Global>>, (), rechner::engine::called_equity::simulate::{closure_env#1}, core::iter::traits::iterator::Iterator::for_each::call::{closure_env#0}, alloc::alloc::Global>>, alloc::vec::{impl#22}::extend_trusted::{closure_env#0}, alloc::alloc::Global>>, alloc::alloc::Global, core::iter::adapters::map::Map, alloc::alloc::Global>>, rechner::engine::called_equity::simulate::{closure_env#1}>>>>> + 10.90% spec_extend, alloc::alloc::Global>>, core::iter::adapters::map::Map, alloc::alloc::Global>>, rechner::engine::called_equity::simulate::{closure_env#1}>, alloc::alloc::Global> + 10.90% fold, alloc::alloc::Global>>, core::slice::iter::Iter, alloc::alloc::Global>>, rechner::engine::called_equity::simulate::{closure_env#1}, (), core::iter::traits::iterator::Iterator::for_each::call::{closure_env#0}, alloc::alloc::Global>>, alloc::vec::{impl#22}::extend_trusted::{closure_env#0}, alloc::alloc::Global>>, alloc::alloc::Global, core::iter::adapters::map::Map, alloc::alloc::Global>>, rechner::engine::called_equity::simulate::{closure_env#1}>>>> + 10.90% extend_trusted, alloc::alloc::Global>>, alloc::alloc::Global, core::iter::adapters::map::Map, alloc::alloc::Global>>, rechner::engine::called_equity::simulate::{closure_env#1}>> + 10.90% {closure#0}<&alloc::boxed::Box, alloc::alloc::Global>, core::option::Option, alloc::alloc::Global>>, (), rechner::engine::called_equity::simulate::{closure_env#1}, core::iter::traits::iterator::Iterator::for_each::call::{closure_env#0}, alloc::alloc::Global>>, alloc::vec::{impl#22}::extend_trusted::{closure_env#0}, alloc::alloc::Global>>, alloc::alloc::Global, core::iter::adapters::map::Map, alloc::alloc::Global>>, rechner::engine::called_equity::simulate::{closure_env#1}>>>> diff --git a/messung_perf/prof4.out.err b/messung_perf/prof4.out.err new file mode 100644 index 00000000..14b5ef20 --- /dev/null +++ b/messung_perf/prof4.out.err @@ -0,0 +1,2 @@ +26.40 s, 31464 engine calls, 0.839 ms/call +16967 samples -> messung_perf/prof4.txt diff --git a/messung_perf/prof4.report.txt b/messung_perf/prof4.report.txt new file mode 100644 index 00000000..fdbddea1 --- /dev/null +++ b/messung_perf/prof4.report.txt @@ -0,0 +1,107 @@ +16967 samples + +== self (innermost function) == + 20.25% ?? + 9.89% index + 8.68% best_of_lanes + 7.44% deal_combo + 5.58% {closure#0} + 5.46% count_ones + 3.03% leading_zeros + 2.91% play_trial + 2.86% then<[u32; 4], rechner::hand::showdown::holdem_lanes::{closure_env#0}> + 2.82% best_with_board + 2.77% swap + 2.32% {closure#2} + 1.95% fold + 1.41% copied + 1.27% next_u64 + 1.13% compare + 1.00% {closure#3} + 0.99% eq + 0.87% unchecked_add + 0.81% branch + 0.80% lt + 0.74% {closure#1} + 0.62% copy + 0.60% eq + 0.50% wrapping_mul + +== self by line == + 19.46% ?? @??:0 + 9.89% index @playing_card.rs:16 + 5.46% count_ones @uint_macros.rs:85 + 4.47% {closure#0} @sample.rs:76 + 4.07% deal_combo @sample.rs:? + 3.03% leading_zeros @uint_macros.rs:154 + 2.86% then<[u32; 4], rechner::hand::showdown::holdem_lanes::{closure_env#0}> @bool.rs:66 + 2.45% swap @sample.rs:42 + 1.51% best_of_lanes @showdown.rs:155 + 1.41% copied @option.rs:2138 + 1.39% best_with_board @showdown.rs:79 + 1.17% best_of_lanes @showdown.rs:149 + 1.16% fold @macros.rs:? + 1.13% deal_combo @sample.rs:86 + 1.13% compare @cmp.rs:339 + 0.87% unchecked_add @uint_macros.rs:1013 + 0.82% best_with_board @showdown.rs:77 + 0.80% branch @result.rs:2177 + 0.79% {closure#2} @showdown.rs:95 + 0.77% best_of_lanes @showdown.rs:158 + 0.77% eq @playing_card.rs:? + 0.77% best_of_lanes @showdown.rs:? + 0.77% best_of_lanes @showdown.rs:159 + 0.66% deal_combo @sample.rs:80 + 0.62% copy @mod.rs:664 + +== inclusive == +100.00% std::panicking::catch_unwind::do_call:: +100.00% call_once +100.00% <&dyn core::ops::function::Fn<> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe as core::ops::function::FnOnce<>>::call_once +100.00% std::rt::lang_start_internal +100.00% std::rt::lang_start_internal::{closure#0} +100.00% std::panic::catch_unwind:: +100.00% std::panic::catch_unwind::<&dyn core::ops::function::Fn<> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe, i32> +100.00% std::panicking::catch_unwind::do_call::<&dyn core::ops::function::Fn<> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe, i32> +100.00% std::panicking::catch_unwind:: +100.00% std::panicking::catch_unwind:: + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe> +100.00% ?? +100.00% main +100.00% __rust_begin_short_backtrace + 99.95% lbr_hand + 99.95% hand + 99.85% {closure#0} + 99.79% or_try_insert_with<(usize, usize), alloc::vec::Vec<>, alloc::alloc::Global, std::collections::hash::map::{impl#72}::or_insert_with::{closure_env#0}<(usize, usize), alloc::vec::Vec<>, alloc::alloc::Global, rechner::blueprint::lbr::hand::{closure#0}::{closure_env#0}<>>, !> + 99.79% or_insert_with<(usize, usize), alloc::vec::Vec<>, alloc::alloc::Global, rechner::blueprint::lbr::hand::{closure#0}::{closure_env#0}<>> + 99.78% {closure#0}<(usize, usize), alloc::vec::Vec<>, alloc::alloc::Global, rechner::blueprint::lbr::hand::{closure#0}::{closure_env#0}<>> + 99.78% zeile + 99.42% {closure#0} + 99.24% zeile_und_entscheidung + 99.00% and_then<(rechner::game::spot::Spot, f64), usize, rechner::blueprint::engine_gegner::{impl#2}::zeile_und_entscheidung::{closure_env#0}> + 98.90% decide + 98.90% decide_with + 98.75% think + 98.73% postflop + 71.06% estimate + 70.31% try_fold, (rechner::equity::tally::Tally, rechner::rng::split_mix::Rng), rechner::equity::monte_carlo::estimate::{closure_env#0}, core::result::Result<>> + 69.41% play_trial + 58.84% {closure#1} + 48.77% called_equity + 48.64% fold<(f64, i32, f64), alloc::vec::Vec<(i32, core::option::Option<>), alloc::alloc::Global>, rechner::engine::called_equity::called_equity::{closure_env#1}> + 48.59% simulate + 29.59% deal_combo + 26.34% {closure#2} + 24.10% best_with_board + 21.42% from_iter, alloc::alloc::Global>>, core::iter::adapters::map::Map, alloc::alloc::Global>>, rechner::engine::called_equity::simulate::{closure_env#1}>> + 21.38% fold, alloc::alloc::Global>>, core::slice::iter::Iter, alloc::alloc::Global>>, rechner::engine::called_equity::simulate::{closure_env#1}, (), core::iter::traits::iterator::Iterator::for_each::call::{closure_env#0}, alloc::alloc::Global>>, alloc::vec::{impl#22}::extend_trusted::{closure_env#0}, alloc::alloc::Global>>, alloc::alloc::Global, core::iter::adapters::map::Map, alloc::alloc::Global>>, rechner::engine::called_equity::simulate::{closure_env#1}>>>> + 21.38% fold, alloc::alloc::Global>, (), core::iter::adapters::map::map_fold::{closure_env#0}<&alloc::boxed::Box, alloc::alloc::Global>, core::option::Option, alloc::alloc::Global>>, (), rechner::engine::called_equity::simulate::{closure_env#1}, core::iter::traits::iterator::Iterator::for_each::call::{closure_env#0}, alloc::alloc::Global>>, alloc::vec::{impl#22}::extend_trusted::{closure_env#0}, alloc::alloc::Global>>, alloc::alloc::Global, core::iter::adapters::map::Map, alloc::alloc::Global>>, rechner::engine::called_equity::simulate::{closure_env#1}>>>>> + 21.38% {closure#0}<&alloc::boxed::Box, alloc::alloc::Global>, core::option::Option, alloc::alloc::Global>>, (), rechner::engine::called_equity::simulate::{closure_env#1}, core::iter::traits::iterator::Iterator::for_each::call::{closure_env#0}, alloc::alloc::Global>>, alloc::vec::{impl#22}::extend_trusted::{closure_env#0}, alloc::alloc::Global>>, alloc::alloc::Global, core::iter::adapters::map::Map, alloc::alloc::Global>>, rechner::engine::called_equity::simulate::{closure_env#1}>>>> + 21.38% extend_trusted, alloc::alloc::Global>>, alloc::alloc::Global, core::iter::adapters::map::Map, alloc::alloc::Global>>, rechner::engine::called_equity::simulate::{closure_env#1}>> + 21.38% for_each, alloc::alloc::Global>>, rechner::engine::called_equity::simulate::{closure_env#1}>, alloc::vec::{impl#22}::extend_trusted::{closure_env#0}, alloc::alloc::Global>>, alloc::alloc::Global, core::iter::adapters::map::Map, alloc::alloc::Global>>, rechner::engine::called_equity::simulate::{closure_env#1}>>> + 21.38% spec_extend, alloc::alloc::Global>>, core::iter::adapters::map::Map, alloc::alloc::Global>>, rechner::engine::called_equity::simulate::{closure_env#1}>, alloc::alloc::Global> + 21.38% combos + 21.37% best_of_lanes + 20.97% collect, core::iter::adapters::map::Map, rechner::engine::range_combos::combos::{closure#0}::{closure_env#0}>, rechner::engine::range_combos::combos::{closure_env#0}>, rechner::engine::range_combos::combos::{closure_env#1}>, rechner::engine::range_combos::combos::{closure_env#2}>, alloc::vec::Vec, alloc::alloc::Global>> + 20.97% from_iter, core::iter::adapters::filter::Filter, core::iter::adapters::map::Map, rechner::engine::range_combos::combos::{closure#0}::{closure_env#0}>, rechner::engine::range_combos::combos::{closure_env#0}>, rechner::engine::range_combos::combos::{closure_env#1}>, rechner::engine::range_combos::combos::{closure_env#2}>> + 20.06% spec_extend, core::iter::adapters::filter::Filter, core::iter::adapters::map::Map, rechner::engine::range_combos::combos::{closure#0}::{closure_env#0}>, rechner::engine::range_combos::combos::{closure_env#0}>, rechner::engine::range_combos::combos::{closure_env#1}>, rechner::engine::range_combos::combos::{closure_env#2}>, alloc::alloc::Global> + 20.06% extend_desugared, alloc::alloc::Global, core::iter::adapters::filter::Filter, core::iter::adapters::map::Map, rechner::engine::range_combos::combos::{closure#0}::{closure_env#0}>, rechner::engine::range_combos::combos::{closure_env#0}>, rechner::engine::range_combos::combos::{closure_env#1}>, rechner::engine::range_combos::combos::{closure_env#2}>> diff --git a/messung_perf/prof5.out.err b/messung_perf/prof5.out.err new file mode 100644 index 00000000..f2d50802 --- /dev/null +++ b/messung_perf/prof5.out.err @@ -0,0 +1,2 @@ +18.01 s, 31464 engine calls, 0.572 ms/call +11827 samples -> messung_perf/prof5.txt diff --git a/messung_perf/prof5.report.txt b/messung_perf/prof5.report.txt new file mode 100644 index 00000000..a1f5aed9 --- /dev/null +++ b/messung_perf/prof5.report.txt @@ -0,0 +1,107 @@ +11827 samples + +== self (innermost function) == + 13.01% best_of_lanes + 9.39% ?? + 8.40% count_ones + 6.21% deal_combo + 5.09% leading_zeros + 5.01% then<[u32; 4], rechner::hand::showdown::holdem_lanes::{closure_env#0}> + 4.50% play_trial + 4.25% best_with_board + 4.06% swap + 4.02% {closure#2} + 3.19% index + 2.28% {closure#0} + 2.12% copied + 2.07% compare + 1.50% all + 1.49% {closure#3} + 1.29% lt + 1.26% branch + 1.09% eq + 0.81% copy_nonoverlapping + 0.75% shuffle_front + 0.74% contains + 0.70% next_u64 + 0.68% copy + 0.67% lanes>> + +== self by line == + 8.99% ?? @??:0 + 8.40% count_ones @uint_macros.rs:85 + 5.09% leading_zeros @uint_macros.rs:154 + 5.01% then<[u32; 4], rechner::hand::showdown::holdem_lanes::{closure_env#0}> @bool.rs:66 + 3.35% swap @sample.rs:42 + 3.19% index @playing_card.rs:16 + 2.67% best_of_lanes @showdown.rs:155 + 2.28% best_with_board @showdown.rs:79 + 2.12% copied @option.rs:2138 + 2.07% compare @cmp.rs:339 + 1.82% best_of_lanes @showdown.rs:149 + 1.56% deal_combo @sample.rs:? + 1.50% all @macros.rs:310 + 1.41% {closure#2} @showdown.rs:95 + 1.32% deal_combo @sample.rs:85 + 1.25% branch @result.rs:2177 + 1.19% best_with_board @showdown.rs:77 + 1.18% best_of_lanes @showdown.rs:158 + 1.03% best_of_lanes @showdown.rs:? + 0.92% deal_combo @sample.rs:78 + 0.90% best_of_lanes @showdown.rs:159 + 0.90% deal_combo @sample.rs:80 + 0.89% {closure#3} @showdown.rs:101 + 0.87% {closure#0} @showdown.rs:85 + 0.87% play_trial @monte_carlo.rs:54 + +== inclusive == +100.00% std::panicking::catch_unwind:: +100.00% std::panic::catch_unwind:: +100.00% std::panicking::catch_unwind::do_call::<&dyn core::ops::function::Fn<> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe, i32> +100.00% <&dyn core::ops::function::Fn<> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe as core::ops::function::FnOnce<>>::call_once +100.00% std::rt::lang_start_internal::{closure#0} +100.00% call_once +100.00% std::panic::catch_unwind::<&dyn core::ops::function::Fn<> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe, i32> +100.00% std::rt::lang_start_internal +100.00% std::panicking::catch_unwind::do_call:: +100.00% __rust_begin_short_backtrace +100.00% ?? +100.00% main +100.00% std::panicking::catch_unwind:: + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe> + 99.88% lbr_hand + 99.88% hand + 99.79% {closure#0} + 99.75% or_try_insert_with<(usize, usize), alloc::vec::Vec<>, alloc::alloc::Global, std::collections::hash::map::{impl#72}::or_insert_with::{closure_env#0}<(usize, usize), alloc::vec::Vec<>, alloc::alloc::Global, rechner::blueprint::lbr::hand::{closure#0}::{closure_env#0}<>>, !> + 99.75% or_insert_with<(usize, usize), alloc::vec::Vec<>, alloc::alloc::Global, rechner::blueprint::lbr::hand::{closure#0}::{closure_env#0}<>> + 99.74% zeile + 99.74% {closure#0}<(usize, usize), alloc::vec::Vec<>, alloc::alloc::Global, rechner::blueprint::lbr::hand::{closure#0}::{closure_env#0}<>> + 99.43% {closure#0} + 99.22% zeile_und_entscheidung + 98.98% and_then<(rechner::game::spot::Spot, f64), usize, rechner::blueprint::engine_gegner::{impl#2}::zeile_und_entscheidung::{closure_env#0}> + 98.88% decide + 98.88% decide_with + 98.62% think + 98.60% postflop + 80.80% estimate + 80.18% try_fold, (rechner::equity::tally::Tally, rechner::rng::split_mix::Rng), rechner::equity::monte_carlo::estimate::{closure_env#0}, core::result::Result<>> + 79.26% play_trial + 51.92% {closure#1} + 45.15% called_equity + 45.02% fold<(f64, i32, f64), alloc::vec::Vec<(i32, core::option::Option<>), alloc::alloc::Global>, rechner::engine::called_equity::called_equity::{closure_env#1}> + 44.98% simulate + 44.22% {closure#2} + 37.46% best_with_board + 33.36% best_of_lanes + 17.04% deal_combo + 9.97% from_iter, alloc::alloc::Global>>, core::iter::adapters::map::Map, alloc::alloc::Global>>, rechner::engine::called_equity::simulate::{closure_env#1}>> + 9.93% fold, alloc::alloc::Global>, (), core::iter::adapters::map::map_fold::{closure_env#0}<&alloc::boxed::Box, alloc::alloc::Global>, core::option::Option, alloc::alloc::Global>>, (), rechner::engine::called_equity::simulate::{closure_env#1}, core::iter::traits::iterator::Iterator::for_each::call::{closure_env#0}, alloc::alloc::Global>>, alloc::vec::{impl#22}::extend_trusted::{closure_env#0}, alloc::alloc::Global>>, alloc::alloc::Global, core::iter::adapters::map::Map, alloc::alloc::Global>>, rechner::engine::called_equity::simulate::{closure_env#1}>>>>> + 9.93% extend_trusted, alloc::alloc::Global>>, alloc::alloc::Global, core::iter::adapters::map::Map, alloc::alloc::Global>>, rechner::engine::called_equity::simulate::{closure_env#1}>> + 9.93% spec_extend, alloc::alloc::Global>>, core::iter::adapters::map::Map, alloc::alloc::Global>>, rechner::engine::called_equity::simulate::{closure_env#1}>, alloc::alloc::Global> + 9.93% for_each, alloc::alloc::Global>>, rechner::engine::called_equity::simulate::{closure_env#1}>, alloc::vec::{impl#22}::extend_trusted::{closure_env#0}, alloc::alloc::Global>>, alloc::alloc::Global, core::iter::adapters::map::Map, alloc::alloc::Global>>, rechner::engine::called_equity::simulate::{closure_env#1}>>> + 9.93% {closure#0}<&alloc::boxed::Box, alloc::alloc::Global>, core::option::Option, alloc::alloc::Global>>, (), rechner::engine::called_equity::simulate::{closure_env#1}, core::iter::traits::iterator::Iterator::for_each::call::{closure_env#0}, alloc::alloc::Global>>, alloc::vec::{impl#22}::extend_trusted::{closure_env#0}, alloc::alloc::Global>>, alloc::alloc::Global, core::iter::adapters::map::Map, alloc::alloc::Global>>, rechner::engine::called_equity::simulate::{closure_env#1}>>>> + 9.93% combos + 9.93% fold, alloc::alloc::Global>>, core::slice::iter::Iter, alloc::alloc::Global>>, rechner::engine::called_equity::simulate::{closure_env#1}, (), core::iter::traits::iterator::Iterator::for_each::call::{closure_env#0}, alloc::alloc::Global>>, alloc::vec::{impl#22}::extend_trusted::{closure_env#0}, alloc::alloc::Global>>, alloc::alloc::Global, core::iter::adapters::map::Map, alloc::alloc::Global>>, rechner::engine::called_equity::simulate::{closure_env#1}>>>> + 9.40% collect, core::iter::adapters::map::Map, rechner::engine::range_combos::combos::{closure#0}::{closure_env#0}>, rechner::engine::range_combos::combos::{closure_env#0}>, rechner::engine::range_combos::combos::{closure_env#1}>, rechner::engine::range_combos::combos::{closure_env#2}>, alloc::vec::Vec, alloc::alloc::Global>> + 9.40% from_iter, core::iter::adapters::map::Map, core::iter::adapters::map::Map, rechner::engine::range_combos::combos::{closure#0}::{closure_env#0}>, rechner::engine::range_combos::combos::{closure_env#0}>, rechner::engine::range_combos::combos::{closure_env#1}>, rechner::engine::range_combos::combos::{closure_env#2}>> + 9.10% extend_desugared, alloc::alloc::Global, core::iter::adapters::map::Map, core::iter::adapters::map::Map, rechner::engine::range_combos::combos::{closure#0}::{closure_env#0}>, rechner::engine::range_combos::combos::{closure_env#0}>, rechner::engine::range_combos::combos::{closure_env#1}>, rechner::engine::range_combos::combos::{closure_env#2}>> + 9.10% spec_extend, core::iter::adapters::map::Map, core::iter::adapters::map::Map, rechner::engine::range_combos::combos::{closure#0}::{closure_env#0}>, rechner::engine::range_combos::combos::{closure_env#0}>, rechner::engine::range_combos::combos::{closure_env#1}>, rechner::engine::range_combos::combos::{closure_env#2}>, alloc::alloc::Global> diff --git a/messung_perf/profz.out.err b/messung_perf/profz.out.err new file mode 100644 index 00000000..38658a45 --- /dev/null +++ b/messung_perf/profz.out.err @@ -0,0 +1,2 @@ +5.14 s, 0 engine calls, 5143.615 ms/call +3377 samples -> messung_perf/profz.txt diff --git a/messung_perf/profz.report.txt b/messung_perf/profz.report.txt new file mode 100644 index 00000000..36cde8bd --- /dev/null +++ b/messung_perf/profz.report.txt @@ -0,0 +1,107 @@ +3377 samples + +== self (innermost function) == + 19.43% ?? + 10.84% {closure#0} + 8.32% terminal_value + 5.92% checked_shl + 4.32% spec_try_fold, core::ops::try_trait::NeverShortCircuit<>> + 3.85% unchecked_add + 3.38% lt + 3.02% spec_try_fold, rechner::read::windows::windows::{closure_env#0}, core::iter::traits::iterator::Iterator::any::check::{closure_env#0}<>>, core::ops::control_flow::ControlFlow<>> + 2.43% count_ones + 2.43% {closure#0} + 1.95% is_empty + 1.84% best_of_lanes + 1.72% extend_desugared, core::iter::adapters::map::Map, rechner::cfr::regret_matching::matched::{closure#0}::{closure_env#1}>, rechner::cfr::regret_matching::matched::{closure_env#0}>> + 1.51% own_node + 1.48% spec_next + 1.48% try_fold, (), &mut core::iter::traits::iterator::Iterator::any::check::{closure_env#0}<>, core::ops::control_flow::ControlFlow<>> + 1.21% {closure#0}, rechner::read::windows::windows::{closure_env#0}, core::iter::traits::iterator::Iterator::any::check::{closure_env#0}<>> + 0.83% try_fold, rechner::read::windows::windows::{closure_env#0}, (), core::iter::traits::iterator::Iterator::any::check::{closure_env#0}<>, core::ops::control_flow::ControlFlow<>> + 0.83% leading_zeros + 0.71% lanes, core::slice::iter::Iter<>>>> + 0.68% replace + 0.68% index + 0.62% {closure#2} + 0.62% try_fold, core::iter::adapters::map::Map, rechner::read::windows::windows::{closure_env#0}>, (), core::iter::traits::iterator::Iterator::any::check::{closure_env#0}<>, core::ops::control_flow::ControlFlow<>> + 0.56% fold, rechner::cfr::regret_matching::matched::{closure#0}::{closure_env#0}>>>> + +== self by line == + 18.51% ?? @??:0 + 10.84% {closure#0} @uint_macros.rs:2030 + 5.92% checked_shl @uint_macros.rs:2030 + 3.85% unchecked_add @uint_macros.rs:1013 + 3.55% spec_try_fold, core::ops::try_trait::NeverShortCircuit<>> @range.rs:1479 + 3.32% lt @cmp.rs:2144 + 2.87% terminal_value @terminal_value.rs:33 + 2.43% count_ones @uint_macros.rs:85 + 2.22% spec_try_fold, rechner::read::windows::windows::{closure_env#0}, core::iter::traits::iterator::Iterator::any::check::{closure_env#0}<>>, core::ops::control_flow::ControlFlow<>> @range.rs:? + 1.98% terminal_value @terminal_value.rs:53 + 1.69% extend_desugared, core::iter::adapters::map::Map, rechner::cfr::regret_matching::matched::{closure#0}::{closure_env#1}>, rechner::cfr::regret_matching::matched::{closure_env#0}>> @regret_matching.rs:? + 1.45% try_fold, (), &mut core::iter::traits::iterator::Iterator::any::check::{closure_env#0}<>, core::ops::control_flow::ControlFlow<>> @iterator.rs:? + 1.39% terminal_value @terminal_value.rs:39 + 1.36% spec_next @range.rs:1100 + 1.10% is_empty @range.rs:575 + 1.04% {closure#0}, rechner::read::windows::windows::{closure_env#0}, core::iter::traits::iterator::Iterator::any::check::{closure_env#0}<>> @straight_draw.rs:? + 0.89% terminal_value @terminal_value.rs:59 + 0.83% leading_zeros @uint_macros.rs:154 + 0.80% is_empty @map.rs:115 + 0.77% spec_try_fold, core::ops::try_trait::NeverShortCircuit<>> @range.rs:? + 0.71% spec_try_fold, rechner::read::windows::windows::{closure_env#0}, core::iter::traits::iterator::Iterator::any::check::{closure_env#0}<>>, core::ops::control_flow::ControlFlow<>> @range.rs:1479 + 0.71% {closure#0} @windows.rs:17 + 0.68% replace @mod.rs:976 + 0.68% index @playing_card.rs:16 + 0.62% lanes, core::slice::iter::Iter<>>>> @showdown.rs:61 + +== inclusive == +100.00% std::panic::catch_unwind:: +100.00% std::rt::lang_start_internal +100.00% std::rt::lang_start_internal::{closure#0} +100.00% std::panicking::catch_unwind::do_call:: +100.00% call_once +100.00% std::panicking::catch_unwind:: + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe> +100.00% ?? +100.00% <&dyn core::ops::function::Fn<> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe as core::ops::function::FnOnce<>>::call_once +100.00% __rust_begin_short_backtrace +100.00% std::panic::catch_unwind::<&dyn core::ops::function::Fn<> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe, i32> +100.00% std::panicking::catch_unwind::do_call::<&dyn core::ops::function::Fn<> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe, i32> +100.00% main +100.00% std::panicking::catch_unwind:: + 99.88% deal_samples_at + 99.88% deal_samples_memory + 99.85% play_hand_tracked + 99.59% run + 97.78% round + 97.78% act + 97.78% act_inner + 97.01% hero_act + 96.95% decide_with + 96.95% think + 96.92% postflop + 85.11% {closure#0} + 61.68% {closure#1} + 53.39% fold<(f64, i32, f64), alloc::vec::Vec<(i32, core::option::Option<>), alloc::alloc::Global>, rechner::engine::called_equity::called_equity::{closure_env#1}> + 53.39% called_equity + 53.39% simulate + 48.92% meets + 48.89% glance + 42.11% draw_of + 39.30% completing_ranks + 39.12% sum, rechner::read::straight_draw::completing_ranks::{closure_env#0}>, core::iter::adapters::filter::{impl#3}::count::to_usize::{closure_env#0}<>>, usize> + 39.12% try_fold, core::iter::traits::accum::{impl#48}::sum::{closure_env#0}, rechner::read::straight_draw::completing_ranks::{closure_env#0}>, core::iter::adapters::filter::{impl#3}::count::to_usize::{closure_env#0}<>>>>>>, core::ops::try_trait::NeverShortCircuit<>> + 39.12% spec_try_fold, core::iter::traits::accum::{impl#48}::sum::{closure_env#0}, rechner::read::straight_draw::completing_ranks::{closure_env#0}>, core::iter::adapters::filter::{impl#3}::count::to_usize::{closure_env#0}<>>>>>>, core::ops::try_trait::NeverShortCircuit<>> + 39.12% sum, rechner::read::straight_draw::completing_ranks::{closure_env#0}>, core::iter::adapters::filter::{impl#3}::count::to_usize::{closure_env#0}<>>> + 39.12% fold, rechner::read::straight_draw::completing_ranks::{closure_env#0}>, core::iter::adapters::filter::{impl#3}::count::to_usize::{closure_env#0}<>, usize, core::iter::traits::accum::{impl#48}::sum::{closure_env#0}, rechner::read::straight_draw::completing_ranks::{closure_env#0}>, core::iter::adapters::filter::{impl#3}::count::to_usize::{closure_env#0}<>>>> + 39.12% fold, core::iter::traits::accum::{impl#48}::sum::{closure_env#0}, rechner::read::straight_draw::completing_ranks::{closure_env#0}>, core::iter::adapters::filter::{impl#3}::count::to_usize::{closure_env#0}<>>>>>> + 39.12% fold, rechner::read::straight_draw::completing_ranks::{closure_env#0}, usize, core::iter::adapters::map::map_fold::{closure_env#0}, core::iter::traits::accum::{impl#48}::sum::{closure_env#0}, rechner::read::straight_draw::completing_ranks::{closure_env#0}>, core::iter::adapters::filter::{impl#3}::count::to_usize::{closure_env#0}<>>>>> + 39.12% count, rechner::read::straight_draw::completing_ranks::{closure_env#0}>, rechner::read::straight_draw::completing_ranks::{closure_env#1}> + 38.82% {closure#0}, core::iter::traits::accum::{impl#48}::sum::{closure_env#0}, rechner::read::straight_draw::completing_ranks::{closure_env#0}>, core::iter::adapters::filter::{impl#3}::count::to_usize::{closure_env#0}<>>>>>> + 38.82% {closure#0}, core::iter::traits::accum::{impl#48}::sum::{closure_env#0}, rechner::read::straight_draw::completing_ranks::{closure_env#0}>, core::iter::adapters::filter::{impl#3}::count::to_usize::{closure_env#0}<>>>>> + 38.53% {closure#0}, core::iter::traits::accum::{impl#48}::sum::{closure_env#0}, rechner::read::straight_draw::completing_ranks::{closure_env#0}>, core::iter::adapters::filter::{impl#3}::count::to_usize::{closure_env#0}<>>>> + 38.47% {closure#0} + 38.11% any, core::iter::adapters::map::Map, rechner::read::windows::windows::{closure_env#0}>>, rechner::read::straight_draw::completing_ranks::{closure#1}::{closure_env#0}> + 36.87% try_fold, rechner::read::windows::windows::{closure_env#0}, (), core::iter::traits::iterator::Iterator::any::check::{closure_env#0}<>, core::ops::control_flow::ControlFlow<>> + 36.04% try_fold, rechner::read::windows::windows::{closure_env#0}, core::iter::traits::iterator::Iterator::any::check::{closure_env#0}<>>, core::ops::control_flow::ControlFlow<>> + 36.04% spec_try_fold, rechner::read::windows::windows::{closure_env#0}, core::iter::traits::iterator::Iterator::any::check::{closure_env#0}<>>, core::ops::control_flow::ControlFlow<>> + 32.40% river_exploit_plan diff --git a/messung_perf/profz6.out.err b/messung_perf/profz6.out.err new file mode 100644 index 00000000..b8db1efb --- /dev/null +++ b/messung_perf/profz6.out.err @@ -0,0 +1,2 @@ +6.80 s, 0 engine calls, 6802.012 ms/call +4473 samples -> messung_perf/profz6.txt diff --git a/messung_perf/profz6.report.txt b/messung_perf/profz6.report.txt new file mode 100644 index 00000000..e57077b3 --- /dev/null +++ b/messung_perf/profz6.report.txt @@ -0,0 +1,107 @@ +4473 samples + +== self (innermost function) == + 24.21% ?? + 12.01% completes + 10.24% terminal_value + 3.31% count_ones + 3.06% best_of_lanes + 2.33% checked_shl + 2.15% {closure#0} + 1.97% spec_next + 1.86% extend_desugared, core::iter::adapters::map::Map, rechner::cfr::regret_matching::matched::{closure#0}::{closure_env#1}>, rechner::cfr::regret_matching::matched::{closure_env#0}>> + 1.56% eq + 1.23% unchecked_add + 1.18% own_node + 1.10% leading_zeros + 1.07% {closure#2} + 1.05% index + 0.94% completing_ranks + 0.87% lt + 0.78% lanes, core::slice::iter::Iter<>>>> + 0.78% deal_combo + 0.74% add + 0.69% {closure#1} + 0.67% any + 0.67% copied + 0.67% {closure#0}, core::iter::traits::accum::{impl#48}::sum::{closure_env#0}, rechner::read::straight_draw::completing_ranks::{closure_env#0}>, core::iter::adapters::filter::{impl#3}::count::to_usize::{closure_env#0}<>>>>> + 0.63% of + +== self by line == + 23.09% ?? @??:0 + 10.33% completes @straight_draw.rs:31 + 4.56% terminal_value @terminal_value.rs:33 + 3.31% count_ones @uint_macros.rs:85 + 2.33% checked_shl @uint_macros.rs:2030 + 1.90% spec_next @range.rs:1100 + 1.86% terminal_value @terminal_value.rs:53 + 1.86% terminal_value @terminal_value.rs:39 + 1.72% extend_desugared, core::iter::adapters::map::Map, rechner::cfr::regret_matching::matched::{closure#0}::{closure_env#1}>, rechner::cfr::regret_matching::matched::{closure_env#0}>> @regret_matching.rs:? + 1.68% completes @straight_draw.rs:34 + 1.56% eq @non_null.rs:1663 + 1.23% unchecked_add @uint_macros.rs:1013 + 1.10% leading_zeros @uint_macros.rs:154 + 1.05% index @playing_card.rs:16 + 0.83% terminal_value @terminal_value.rs:59 + 0.76% lanes, core::slice::iter::Iter<>>>> @showdown.rs:61 + 0.67% add @non_null.rs:627 + 0.67% copied @option.rs:2138 + 0.67% lt @cmp.rs:2144 + 0.67% {closure#0}, core::iter::traits::accum::{impl#48}::sum::{closure_env#0}, rechner::read::straight_draw::completing_ranks::{closure_env#0}>, core::iter::adapters::filter::{impl#3}::count::to_usize::{closure_env#0}<>>>>> @straight_draw.rs:? + 0.58% any @macros.rs:327 + 0.58% max @f64.rs:1091 + 0.56% then<[u32; 4], rechner::hand::showdown::holdem_lanes::{closure_env#0}> @bool.rs:66 + 0.56% ?? @perf_probe.b1ab846a04ee54aa-cgu.4:? + 0.56% write> @mod.rs:1963 + +== inclusive == +100.00% <&dyn core::ops::function::Fn<> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe as core::ops::function::FnOnce<>>::call_once +100.00% std::panicking::catch_unwind:: +100.00% std::panicking::catch_unwind::do_call:: +100.00% std::panicking::catch_unwind::do_call::<&dyn core::ops::function::Fn<> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe, i32> +100.00% std::panic::catch_unwind:: +100.00% std::rt::lang_start_internal::{closure#0} +100.00% std::panic::catch_unwind::<&dyn core::ops::function::Fn<> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe, i32> +100.00% main +100.00% __rust_begin_short_backtrace +100.00% call_once +100.00% std::rt::lang_start_internal +100.00% std::panicking::catch_unwind:: + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe> +100.00% ?? + 99.93% play_hand_tracked + 99.93% deal_samples_at + 99.93% deal_samples_memory + 99.37% run + 96.40% round + 96.38% act + 96.38% act_inner + 94.59% hero_act + 94.41% decide_with + 94.32% think + 94.28% postflop + 80.82% {closure#0} + 53.25% {closure#1} + 45.76% fold<(f64, i32, f64), alloc::vec::Vec<(i32, core::option::Option<>), alloc::alloc::Global>, rechner::engine::called_equity::called_equity::{closure_env#1}> + 45.76% called_equity + 45.76% simulate + 36.69% fold_veto + 36.69% river_exploit_plan + 36.69% river_exploit_mix + 36.64% subgame + 36.42% try_fold), alloc::alloc::Global>, alloc::vec::Vec<>), core::ops::try_trait::{impl#0}::wrap_mut_2::{closure_env#0}<(rechner::cfr::solver_state::SolverState, rechner::rng::split_mix::Rng, alloc::vec::Vec<(u32, alloc::vec::Vec<>), alloc::alloc::Global>, alloc::vec::Vec<>), (rechner::cfr::solver_state::SolverState, rechner::rng::split_mix::Rng, alloc::vec::Vec<(u32, alloc::vec::Vec<>), alloc::alloc::Global>, alloc::vec::Vec<>), u32, rechner::cfr::solve::solve::{closure_env#0}<>>, core::ops::try_trait::NeverShortCircuit<(rechner::cfr::solver_state::SolverState, rechner::rng::split_mix::Rng, alloc::vec::Vec<(u32, alloc::vec::Vec<>), alloc::alloc::Global>, alloc::vec::Vec<>)>> + 36.42% {closure#0}<(rechner::cfr::solver_state::SolverState, rechner::rng::split_mix::Rng, alloc::vec::Vec<(u32, alloc::vec::Vec<>), alloc::alloc::Global>, alloc::vec::Vec<>), (rechner::cfr::solver_state::SolverState, rechner::rng::split_mix::Rng, alloc::vec::Vec<(u32, alloc::vec::Vec<>), alloc::alloc::Global>, alloc::vec::Vec<>), u32, rechner::cfr::solve::solve::{closure_env#0}<>> + 36.42% {closure#0} + 36.42% solve + 36.42% spec_try_fold), alloc::alloc::Global>, alloc::vec::Vec<>), core::ops::try_trait::{impl#0}::wrap_mut_2::{closure_env#0}<(rechner::cfr::solver_state::SolverState, rechner::rng::split_mix::Rng, alloc::vec::Vec<(u32, alloc::vec::Vec<>), alloc::alloc::Global>, alloc::vec::Vec<>), (rechner::cfr::solver_state::SolverState, rechner::rng::split_mix::Rng, alloc::vec::Vec<(u32, alloc::vec::Vec<>), alloc::alloc::Global>, alloc::vec::Vec<>), u32, rechner::cfr::solve::solve::{closure_env#0}<>>, core::ops::try_trait::NeverShortCircuit<(rechner::cfr::solver_state::SolverState, rechner::rng::split_mix::Rng, alloc::vec::Vec<(u32, alloc::vec::Vec<>), alloc::alloc::Global>, alloc::vec::Vec<>)>> + 36.42% fold), alloc::alloc::Global>, alloc::vec::Vec<>), rechner::cfr::solve::solve::{closure_env#0}<>> + 34.54% meets + 34.38% iterate + 34.38% step + 34.27% glance + 34.21% walk + 27.72% own_node + 27.07% {closure#2} + 26.36% range_filter + 26.02% new + 25.75% acceptances + 24.95% from_iter, core::iter::adapters::map::Map>, rechner::cfr::iterate::{impl#0}::own_node::{closure_env#0}>> diff --git a/messung_perf/ref/lbr0_4.out.err b/messung_perf/ref/lbr0_4.out.err new file mode 100644 index 00000000..f8c92785 --- /dev/null +++ b/messung_perf/ref/lbr0_4.out.err @@ -0,0 +1,2 @@ +0 of 4 hands done, 4 to go, 1 threads +4/4 new, 4 total: LBR +125.0 ±173.2 bb/100, 43.1 s/hand diff --git a/messung_perf/ref/lbr0_4.txt b/messung_perf/ref/lbr0_4.txt new file mode 100644 index 00000000..2d646828 --- /dev/null +++ b/messung_perf/ref/lbr0_4.txt @@ -0,0 +1,4 @@ +0 2.5 +1 2.5 +2 -2.5 +3 2.5 diff --git a/messung_perf/ref/probe0_lbr_0_20_s7.txt b/messung_perf/ref/probe0_lbr_0_20_s7.txt new file mode 100644 index 00000000..e87b0c64 --- /dev/null +++ b/messung_perf/ref/probe0_lbr_0_20_s7.txt @@ -0,0 +1,21 @@ +0 2.5 +1 2.5 +2 -2.5 +3 2.5 +4 2.5 +5 2.5 +6 -2.5 +7 2.5 +8 -5 +9 2.5 +10 2.5 +11 4.15 +12 2.5 +13 100 +14 2.5 +15 -2.5 +16 -14.900000000000002 +17 -12.5 +18 -4.15 +19 100 +fingerprint 6c0a9a7645372cec calls 49212 diff --git a/messung_perf/ref/probe0_lbr_0_20_s7.txt.err b/messung_perf/ref/probe0_lbr_0_20_s7.txt.err new file mode 100644 index 00000000..72a55069 --- /dev/null +++ b/messung_perf/ref/probe0_lbr_0_20_s7.txt.err @@ -0,0 +1 @@ +1157.03 s, 49212 engine calls, 23.511 ms/call diff --git a/messung_perf/ref/probe_lbr_0_6.txt b/messung_perf/ref/probe_lbr_0_6.txt new file mode 100644 index 00000000..b44b1960 --- /dev/null +++ b/messung_perf/ref/probe_lbr_0_6.txt @@ -0,0 +1,7 @@ +0 2.5 +1 2.5 +2 -2.5 +3 2.5 +4 2.5 +5 2.5 +fingerprint 9754b5c8b2a54d12 calls 13119 diff --git a/messung_perf/ref/probe_lbr_0_6.txt.err b/messung_perf/ref/probe_lbr_0_6.txt.err new file mode 100644 index 00000000..733372ec --- /dev/null +++ b/messung_perf/ref/probe_lbr_0_6.txt.err @@ -0,0 +1 @@ +249.75 s, 13119 engine calls, 19.037 ms/call diff --git a/messung_perf/s0.time b/messung_perf/s0.time new file mode 100644 index 00000000..dc6a898e --- /dev/null +++ b/messung_perf/s0.time @@ -0,0 +1 @@ +207.73 s cpu 188.63 s exit diff --git a/messung_perf/s0.txt b/messung_perf/s0.txt new file mode 100644 index 00000000..127224e0 --- /dev/null +++ b/messung_perf/s0.txt @@ -0,0 +1,5 @@ +0 2.5 +1 2.5 +2 2.5 +3 2.5 +fingerprint 63a7e9b3bd5b360b calls 8299 diff --git a/messung_perf/s0.txt.err b/messung_perf/s0.txt.err new file mode 100644 index 00000000..a573c5e3 --- /dev/null +++ b/messung_perf/s0.txt.err @@ -0,0 +1 @@ +206.55 s, 8299 engine calls, 24.889 ms/call diff --git a/messung_perf/s1.txt b/messung_perf/s1.txt new file mode 100644 index 00000000..127224e0 --- /dev/null +++ b/messung_perf/s1.txt @@ -0,0 +1,5 @@ +0 2.5 +1 2.5 +2 2.5 +3 2.5 +fingerprint 63a7e9b3bd5b360b calls 8299 diff --git a/messung_perf/s1.txt.err b/messung_perf/s1.txt.err new file mode 100644 index 00000000..d941f5b2 --- /dev/null +++ b/messung_perf/s1.txt.err @@ -0,0 +1 @@ +8.62 s, 8299 engine calls, 1.038 ms/call diff --git a/messung_perf/solver-ueberall-perf.patch b/messung_perf/solver-ueberall-perf.patch new file mode 100644 index 00000000..f1c2232f --- /dev/null +++ b/messung_perf/solver-ueberall-perf.patch @@ -0,0 +1,1016 @@ +diff --git a/src/cfr/turn_river_game.rs b/src/cfr/turn_river_game.rs +index 1639722..74f7349 100644 +--- a/src/cfr/turn_river_game.rs ++++ b/src/cfr/turn_river_game.rs +@@ -271,6 +271,11 @@ pub struct TrSolver { + regret: Vec>, + sums: Vec>, + pub iterations: u32, ++ /// Spare buffers for `walk` (reused across calls and iterations; contents never read before ++ /// they are written, so reuse changes no value). ++ spare: Vec>, ++ /// Buffer for the f32 reach of `show_eq_into`. ++ o32: Vec, + } + + /// The average strategy: per decision node, per copy (1 on the turn, one per river card on the +@@ -303,6 +308,35 @@ pub struct Exploit { + } + + fn matched(regret: &[f64], a: usize, out: &mut [f64]) { ++ match a { ++ 2 => matched_n::<2>(regret, out), ++ 3 => matched_n::<3>(regret, out), ++ 4 => matched_n::<4>(regret, out), ++ _ => matched_any(regret, a, out), ++ } ++} ++ ++/// `matched_any` for a fixed action count (same operations: `Iterator::sum` folds from -0.0, and ++/// -0.0 + x == x bit for bit, so the sum is r[0] + r[1] + ... in order). ++fn matched_n(regret: &[f64], out: &mut [f64]) { ++ for (r, o) in regret.chunks_exact(A).zip(out.chunks_exact_mut(A)) { ++ let mut s = r[0]; ++ for x in &r[1..] { ++ s += x; ++ } ++ if s > 0.0 { ++ for t in 0..A { ++ o[t] = r[t] / s; ++ } ++ } else { ++ for y in o.iter_mut() { ++ *y = 1.0 / A as f64; ++ } ++ } ++ } ++} ++ ++fn matched_any(regret: &[f64], a: usize, out: &mut [f64]) { + for (r, o) in regret.chunks(a).zip(out.chunks_mut(a)) { + let s: f64 = r.iter().sum(); + if s > 0.0 { +@@ -368,7 +402,7 @@ impl TrSolver { + } + let sums = regret.clone(); + let masks = [hands[0].masks.clone(), hands[1].masks.clone()]; +- TrSolver { game: std::sync::Arc::new(game), n, cards, masks, same, eq: None, eqm: Vec::new(), lock: Vec::new(), weights, rc, wr, regret, sums, iterations: 0 } ++ TrSolver { game: std::sync::Arc::new(game), n, cards, masks, same, eq: None, eqm: Vec::new(), lock: Vec::new(), weights, rc, wr, regret, sums, iterations: 0, spare: Vec::new(), o32: Vec::new() } + } + + /// Stage C: the game's first street is the FLOP (`board` = three flop cards), the dealt card is the +@@ -433,26 +467,32 @@ impl TrSolver { + /// Showdown values from the equity table (stage C): `half * sum_j opp_j (2 eq_ij - 1)` over disjoint + /// combos, as a dense matrix-vector product. + fn show_eq(&self, r: usize, p: usize, opp: &[f64], half: f64) -> Vec { ++ let mut out = vec![0.0; self.n[p]]; ++ self.show_eq_into(r, p, opp, half, &mut Vec::new(), &mut out); ++ out ++ } ++ ++ /// `show_eq` into `out`, with `o` as the buffer for the f32 reach (same operations). ++ fn show_eq_into(&self, r: usize, p: usize, opp: &[f64], half: f64, o: &mut Vec, out: &mut [f64]) { + let m = &self.eqm[r][p]; + let k = self.n[1 - p]; +- let o: Vec = opp.iter().map(|x| *x as f32).collect(); +- m.chunks_exact(k) +- .map(|row| { +- let mut acc = [0.0f32; 8]; +- let mut cr = row.chunks_exact(8); +- let mut co = o.chunks_exact(8); +- for (a, b) in (&mut cr).zip(&mut co) { +- for t in 0..8 { +- acc[t] += a[t] * b[t]; +- } ++ o.clear(); ++ o.extend(opp.iter().map(|x| *x as f32)); ++ for (row, y) in m.chunks_exact(k).zip(out.iter_mut()) { ++ let mut acc = [0.0f32; 8]; ++ let mut cr = row.chunks_exact(8); ++ let mut co = o.chunks_exact(8); ++ for (a, b) in (&mut cr).zip(&mut co) { ++ for t in 0..8 { ++ acc[t] += a[t] * b[t]; + } +- let mut s: f32 = acc.iter().sum(); +- for (a, b) in cr.remainder().iter().zip(co.remainder()) { +- s += a * b; +- } +- half * s as f64 +- }) +- .collect() ++ } ++ let mut s: f32 = acc.iter().sum(); ++ for (a, b) in cr.remainder().iter().zip(co.remainder()) { ++ s += a * b; ++ } ++ *y = half * s as f64; ++ } + } + + /// Lock decision `node` toward `believed` (one row of action probabilities per hand of the acting +@@ -521,6 +561,13 @@ impl TrSolver { + if self.eq.is_some() { + return self.show_eq(r, p, opp, half); + } ++ let mut out = vec![0.0; self.n[p]]; ++ self.show_into(p, r, opp, half, &mut out); ++ out ++ } ++ ++ /// `show` by rank into `out` (every entry written). ++ fn show_into(&self, p: usize, r: usize, opp: &[f64], half: f64, out: &mut [f64]) { + let rc = &self.rc[r]; + let (n_own, n_opp) = (self.n[p], self.n[1 - p]); + let (own_o, own_r) = (&rc.order[p], &rc.rank[p]); +@@ -536,7 +583,6 @@ impl TrSolver { + let (mut less_t, mut less_c) = (0.0f64, [0.0f64; 64]); + let mut eq_c = [0.0f64; 64]; + let mut ptr = 0; +- let mut out = vec![0.0; n_own]; + let mut k = 0; + while k < n_own { + let s = own_r[own_o[k] as usize]; +@@ -577,40 +623,93 @@ impl TrSolver { + } + k = e; + } +- out + } + + fn mask_by_card(&self, v: &[f64], p: usize, r: usize) -> Vec { + v.iter().zip(&self.rc[r].free[p]).map(|(x, f)| x * f).collect() + } + ++ /// A buffer of `n` zeros from the spares. ++ fn take(&mut self, n: usize) -> Vec { ++ let mut v = self.spare.pop().unwrap_or_default(); ++ v.clear(); ++ if v.capacity() < n { ++ // Room for the largest buffer `walk` asks for (hands x actions), so a spare never regrows. ++ let most = self.n[0].max(self.n[1]) * self.game.acts.iter().map(Vec::len).max().unwrap_or(1).max(1); ++ v.reserve(n.max(most)); ++ } ++ v.resize(n, 0.0); ++ v ++ } ++ ++ fn give(&mut self, v: Vec) { ++ self.spare.push(v); ++ } ++ ++ /// `disjoint(p, opp)[i] * v` into `out` (same operations as `disjoint` then the product). ++ fn fold_into(&self, p: usize, opp: &[f64], v: f64, out: &mut [f64]) { ++ let mut c = [0.0f64; 64]; ++ let mut t = 0.0; ++ for (j, w) in opp.iter().enumerate() { ++ let (a, b) = self.cards[1 - p][j]; ++ c[a] += w; ++ c[b] += w; ++ t += w; ++ } ++ for (i, o) in out.iter_mut().enumerate() { ++ let (a, b) = self.cards[p][i]; ++ *o = (t - c[a] - c[b] + self.same[p][i].map_or(0.0, |j| opp[j])) * v; ++ } ++ } ++ + /// Counterfactual values of the traversing player `p`, one per own combo. + fn walk(&mut self, node: usize, p: usize, own: &[f64], opp: &[f64], r: usize, weight: f64) -> Vec { + let game = std::sync::Arc::clone(&self.game); + match game.nodes[node] { + TNode::Fold { folder, amt } => { + let v = if folder == p { -amt } else { amt }; +- self.disjoint(p, opp).into_iter().map(|x| x * v).collect() ++ let mut out = self.take(self.n[p]); ++ self.fold_into(p, opp, v, &mut out); ++ out ++ } ++ TNode::Show { half } => { ++ let mut out = self.take(self.n[p]); ++ if self.eq.is_some() { ++ let mut o = std::mem::take(&mut self.o32); ++ self.show_eq_into(r, p, opp, half, &mut o, &mut out); ++ self.o32 = o; ++ } else { ++ self.show_into(p, r, opp, half, &mut out); ++ } ++ out + } +- TNode::Show { half } => self.show(p, r, opp, half), + TNode::Chance { child } => { +- let mut total = vec![0.0; self.n[p]]; ++ let mut total = self.take(self.n[p]); ++ let mut o = self.take(own.len()); ++ let mut q = self.take(opp.len()); + for ri in 0..self.rc.len() { +- let o = self.mask_by_card(own, p, ri); +- let q = self.mask_by_card(opp, 1 - p, ri); ++ for ((x, v), f) in o.iter_mut().zip(own).zip(&self.rc[ri].free[p]) { ++ *x = v * f; ++ } ++ for ((x, v), f) in q.iter_mut().zip(opp).zip(&self.rc[ri].free[1 - p]) { ++ *x = v * f; ++ } + let v = self.walk(child, p, &o, &q, ri, weight); + let free = &self.rc[ri].free[p]; + for i in 0..total.len() { + total[i] += self.wr * v[i] * free[i]; + } ++ self.give(v); + } ++ self.give(o); ++ self.give(q); + total + } + TNode::Dec { player, street, ref kids } => { + let a = kids.len(); + let n = self.n[player]; + let off = if street == 0 { 0 } else { r * n * a }; +- let mut sigma = vec![0.0; n * a]; ++ let mut sigma = self.take(n * a); + matched(&self.regret[node][off..off + n * a], a, &mut sigma); + if let Some(Some((believed, w))) = self.lock.get(node) { + for (x, b) in sigma.iter_mut().zip(believed) { +@@ -618,31 +717,43 @@ impl TrSolver { + } + } + if player == p { +- let values: Vec> = kids +- .iter() +- .enumerate() +- .map(|(k, kid)| { +- let reach: Vec = (0..n).map(|i| own[i] * sigma[i * a + k]).collect(); +- self.walk(*kid, p, &reach, opp, r, weight) +- }) +- .collect(); +- let mut node_value = vec![0.0; n]; ++ let mut values: Vec> = Vec::with_capacity(a); ++ let mut reach = self.take(n); ++ for (k, kid) in kids.iter().enumerate() { ++ for (i, x) in reach.iter_mut().enumerate() { ++ *x = own[i] * sigma[i * a + k]; ++ } ++ values.push(self.walk(*kid, p, &reach, opp, r, weight)); ++ } ++ self.give(reach); ++ let mut node_value = self.take(n); ++ let (regret, sums) = (&mut self.regret[node], &mut self.sums[node]); + for i in 0..n { + node_value[i] = (0..a).map(|k| sigma[i * a + k] * values[k][i]).sum(); + for k in 0..a { +- let reg = &mut self.regret[node][off + i * a + k]; ++ let reg = &mut regret[off + i * a + k]; + *reg = (*reg + values[k][i] - node_value[i]).max(0.0); +- self.sums[node][off + i * a + k] += weight * own[i] * sigma[i * a + k]; ++ sums[off + i * a + k] += weight * own[i] * sigma[i * a + k]; + } + } ++ for v in values { ++ self.give(v); ++ } ++ self.give(sigma); + node_value + } else { +- let mut total = vec![0.0; self.n[p]]; ++ let mut total = self.take(self.n[p]); ++ let mut reach = self.take(n); + for (k, kid) in kids.iter().enumerate() { +- let reach: Vec = (0..n).map(|j| opp[j] * sigma[j * a + k]).collect(); ++ for (j, x) in reach.iter_mut().enumerate() { ++ *x = opp[j] * sigma[j * a + k]; ++ } + let v = self.walk(*kid, p, own, &reach, r, weight); + total.iter_mut().zip(&v).for_each(|(t, x)| *t += x); ++ self.give(v); + } ++ self.give(reach); ++ self.give(sigma); + total + } + } +diff --git a/src/engine/range_combos.rs b/src/engine/range_combos.rs +index fa8b166..2b869b7 100644 +--- a/src/engine/range_combos.rs ++++ b/src/engine/range_combos.rs +@@ -17,8 +17,8 @@ pub fn combos(rules: &Rules, filter: &HandFilter, dead: &[Card]) -> Option> = (0..pool.len()) + .flat_map(|i| (i + 1..pool.len()).map(move |j| (i, j))) ++ .filter(|&(i, j)| filter(&[pool[i], pool[j]])) + .map(|(i, j)| vec![pool[i], pool[j]]) +- .filter(|hand| filter(hand)) + .collect(); + (!kept.is_empty()).then_some(kept) + } +diff --git a/src/engine/range_filter.rs b/src/engine/range_filter.rs +index 1773fb1..1cbe0e4 100644 +--- a/src/engine/range_filter.rs ++++ b/src/engine/range_filter.rs +@@ -1,4 +1,7 @@ + use crate::card::{deck, Card}; ++use std::cell::RefCell; ++use std::collections::HashMap; ++use std::rc::Rc; + use crate::exploit::range_spec::{Continuation, RangeSpec}; + use crate::preflop::hand_percentile::percentile; + use crate::read::glance::glance; +@@ -117,25 +120,85 @@ const RELAXED_HI: f64 = 0.5; + /// When no hand of the preflop band meets some floor, the band contradicts what the + /// villain did; the action wins and the band is relaxed to `[0, max(hi, 0.5)]`. + pub fn range_filter(spec: &RangeSpec, rules: Rules, variant: Variant, board: &[Card]) -> HandFilter { +- let board = board.to_vec(); +- let (first, starved) = acceptances(spec, &rules, variant, &board); +- let (spec, qs) = if starved { +- let relaxed = RangeSpec { lo: 0.0, hi: spec.hi.max(RELAXED_HI), continues: spec.continues.clone() }; +- let (qs, _) = acceptances(&relaxed, &rules, variant, &board); +- (relaxed, qs) +- } else { +- (spec.clone(), first) ++ // The range depends on (spec, rules, variant, board) only - not on hero's cards - so one decision ++ // and every decision after it at the same spot (LBR asks every combo at a node) share it: the ++ // acceptances are computed once per key, and each hand's verdict once per key and hand. Text of ++ // the key: `Debug` of f64 round-trips, so different values never share an entry. ++ let key = format!("{spec:?}|{rules:?}|{variant:?}|{board:?}"); ++ let shared = FILTERS.with(|f| f.borrow().get(&key).cloned()); ++ let shared = match shared { ++ Some(s) => s, ++ None => { ++ let s = Rc::new(Kept::new(spec, rules, variant, board)); ++ FILTERS.with(|f| { ++ let mut f = f.borrow_mut(); ++ if f.len() >= FILTER_CACHE { ++ f.clear(); ++ } ++ f.insert(key, s.clone()); ++ }); ++ s ++ } + }; +- Box::new(move |hand: &[Card]| { +- let p = percentile(variant, hand); +- p >= spec.lo +- && p <= spec.hi +- && spec.continues.iter().zip(&qs).enumerate().all(|(step, (c, q))| { +- match meets(&rules, c, hand, &board) { ++ Box::new(move |hand: &[Card]| shared.contains(hand)) ++} ++ ++/// Ranges kept per thread (a decision builds a few; LBR revisits one spot ~1000 times in a row). ++const FILTER_CACHE: usize = 256; ++ ++thread_local! { ++ static FILTERS: RefCell>> = RefCell::new(HashMap::new()); ++} ++ ++/// One built range: the (possibly relaxed) spec, its ticket thresholds, and the verdict per ordered ++/// two-card hand once asked (0 = not yet, 1 = out, 2 = in). ++struct Kept { ++ spec: RangeSpec, ++ qs: Vec, ++ rules: Rules, ++ variant: Variant, ++ board: Vec, ++ verdict: RefCell>, ++} ++ ++impl Kept { ++ fn new(spec: &RangeSpec, rules: Rules, variant: Variant, board: &[Card]) -> Kept { ++ let board = board.to_vec(); ++ let (first, starved) = acceptances(spec, &rules, variant, &board); ++ let (spec, qs) = if starved { ++ let relaxed = RangeSpec { lo: 0.0, hi: spec.hi.max(RELAXED_HI), continues: spec.continues.clone() }; ++ let (qs, _) = acceptances(&relaxed, &rules, variant, &board); ++ (relaxed, qs) ++ } else { ++ (spec.clone(), first) ++ }; ++ Kept { spec, qs, rules, variant, board, verdict: RefCell::new(vec![0; 52 * 52]) } ++ } ++ ++ fn judge(&self, hand: &[Card]) -> bool { ++ let p = percentile(self.variant, hand); ++ p >= self.spec.lo ++ && p <= self.spec.hi ++ && self.spec.continues.iter().zip(&self.qs).enumerate().all(|(step, (c, q))| { ++ match meets(&self.rules, c, hand, &self.board) { + Some(true) => true, + Some(false) => *q > 0.0 && ticket(hand, step) < *q, + None => false, + } + }) +- }) ++ } ++ ++ fn contains(&self, hand: &[Card]) -> bool { ++ if hand.len() != 2 { ++ return self.judge(hand); ++ } ++ let i = hand[0].index() as usize * 52 + hand[1].index() as usize; ++ let known = self.verdict.borrow()[i]; ++ if known != 0 { ++ return known == 2; ++ } ++ let v = self.judge(hand); ++ self.verdict.borrow_mut()[i] = if v { 2 } else { 1 }; ++ v ++ } + } +diff --git a/src/equity/monte_carlo.rs b/src/equity/monte_carlo.rs +index 9aabf72..762b16a 100644 +--- a/src/equity/monte_carlo.rs ++++ b/src/equity/monte_carlo.rs +@@ -1,13 +1,13 @@ + use super::estimate::Estimate; + use super::outcome::Outcome; + use super::query::Query; +-use super::sample::{deal, deal_combo, shuffle_front}; ++use super::sample::{deal, deal_combo, shuffle_front, Pool}; + use super::tally::Tally; + use super::validate::remaining_deck; + use super::villain_range::VillainRange; + use crate::card::Card; + use crate::fault::Fault; +-use crate::hand::showdown::judge; ++use crate::hand::showdown::{best_with_board, holdem_lanes, judge}; + use crate::rng::Rng; + + /// Seeded Monte Carlo equity. Same query + same rng ⇒ same estimate. +@@ -15,7 +15,7 @@ use crate::rng::Rng; + /// `Filter` ranges are sampled by bounded rejection (see `sample::deal` for the fallback), + /// `Combos` ranges directly from their list (`sample::deal_combo`). + pub fn estimate(query: &Query, rng: Rng) -> Result<(Estimate, Rng), Fault> { +- let mut pool = remaining_deck(query)?; ++ let mut pool = Pool::new(remaining_deck(query)?); + let (tally, rng) = (0..query.trials).try_fold((Tally::default(), rng), |(tally, rng), _| { + let (outcome, rng) = play_trial(query, &mut pool, rng)?; + Ok::<_, Fault>((tally.record(outcome), rng)) +@@ -24,30 +24,27 @@ pub fn estimate(query: &Query, rng: Rng) -> Result<(Estimate, Rng), Fault> { + } + + /// One deal: villain hands first (in query order), then the rest of the board. +-fn play_trial(query: &Query, pool: &mut [Card], rng: Rng) -> Result<(Outcome, Rng), Fault> { ++fn play_trial(query: &Query, pool: &mut Pool, rng: Rng) -> Result<(Outcome, Rng), Fault> { + let k = query.rules.hole_cards; + let rules = &query.rules; + let accept_all = |_: &[Card]| true; ++ // Sampled hands go to the front of the pool in villain order, `k` cards each, so a villain's ++ // start is the running sum over the sampled villains before it (recomputed below, no list). + let mut front = 0; + let mut rng = rng; +- // Where each villain's cards: Some(start in pool) for sampled hands. +- let mut starts: Vec> = Vec::with_capacity(query.villains.len()); + for villain in query.villains { + match villain { +- VillainRange::Exact(_) => starts.push(None), ++ VillainRange::Exact(_) => {} + VillainRange::Any => { + rng = deal(pool, front, k, &accept_all, rng); +- starts.push(Some(front)); + front += k; + } + VillainRange::Filter(accept) => { + rng = deal(pool, front, k, *accept, rng); +- starts.push(Some(front)); + front += k; + } + VillainRange::Combos(combos) => { + rng = deal_combo(pool, front, k, combos, rng); +- starts.push(Some(front)); + front += k; + } + } +@@ -55,18 +52,29 @@ fn play_trial(query: &Query, pool: &mut [Card], rng: Rng) -> Result<(Outcome, Rn + let missing = 5 - query.board.len(); + rng = shuffle_front(pool, front, missing, rng); + let mut board = [query.hero[0]; 5]; +- query.board.iter().chain(&pool[front..front + missing]).enumerate().for_each(|(i, c)| board[i] = *c); ++ query.board.iter().chain(&pool.cards[front..front + missing]).enumerate().for_each(|(i, c)| board[i] = *c); + +- let hero = judge(rules, query.hero, &board)?; ++ // Standard hold'em: the board's suit lanes once, each two-card hand adds its own cards. Same value ++ // as `judge`, whose checks cannot fail here: `remaining_deck` made hero, board and known hands ++ // distinct and in the deck, and every dealt card comes from the pool of the others. ++ let lanes = holdem_lanes(rules, &board); ++ let strength_of = |hand: &[Card]| match &lanes { ++ Some(l) if hand.len() == 2 => Ok(best_with_board(l, hand)), ++ _ => judge(rules, hand, &board), ++ }; ++ let hero = strength_of(query.hero)?; + let mut rivals_best = None; + let mut rivals_tied = 0u32; +- for (villain, start) in query.villains.iter().zip(&starts) { +- let hand: &[Card] = match (villain, start) { +- (VillainRange::Exact(cards), _) => cards, +- (_, Some(s)) => &pool[*s..*s + k], +- (_, None) => &[], ++ let mut start = 0; ++ for villain in query.villains { ++ let hand: &[Card] = match villain { ++ VillainRange::Exact(cards) => cards, ++ _ => { ++ start += k; ++ &pool.cards[start - k..start] ++ } + }; +- let strength = judge(rules, hand, &board)?; ++ let strength = strength_of(hand)?; + match rivals_best { + Some(top) if strength < top => {} + Some(top) if strength == top => rivals_tied += 1, +diff --git a/src/equity/sample.rs b/src/equity/sample.rs +index acabb09..8a3a3c5 100644 +--- a/src/equity/sample.rs ++++ b/src/equity/sample.rs +@@ -2,6 +2,10 @@ + //! + //! The pool is only ever permuted, so any arrangement is a uniform starting point for the next + //! partial Fisher-Yates pass; the arrangement itself never leaks out of `monte_carlo`. ++//! ++//! `Pool` keeps, next to the cards, where each card sits (by `Card::index`), so finding a card is one ++//! lookup instead of a scan; every swap updates both. The swaps themselves are exactly those of the ++//! plain slice version, so the arrangement (and every deal after it) is the same. + + use crate::card::Card; + use crate::rng::Rng; +@@ -9,8 +13,39 @@ use crate::rng::Rng; + /// Attempts a `Filter` range gets per hand before the last sample is accepted unfiltered. + pub const MAX_FILTER_ATTEMPTS: u32 = 200; + ++/// The cards still to deal from, and the position of each (`at[card.index()]`; `u8::MAX` for cards ++/// not in the pool). ++pub struct Pool { ++ pub cards: Vec, ++ at: [u8; 64], ++} ++ ++impl Pool { ++ pub fn new(cards: Vec) -> Pool { ++ let mut at = [u8::MAX; 64]; ++ for (i, c) in cards.iter().enumerate() { ++ at[c.index() as usize] = i as u8; ++ } ++ Pool { cards, at } ++ } ++ ++ pub fn len(&self) -> usize { ++ self.cards.len() ++ } ++ ++ pub fn is_empty(&self) -> bool { ++ self.cards.is_empty() ++ } ++ ++ fn swap(&mut self, i: usize, j: usize) { ++ self.cards.swap(i, j); ++ self.at[self.cards[i].index() as usize] = i as u8; ++ self.at[self.cards[j].index() as usize] = j as u8; ++ } ++} ++ + /// Moves `count` uniformly chosen cards from `pool[front..]` to `pool[front..front + count]`. +-pub fn shuffle_front(pool: &mut [Card], front: usize, count: usize, rng: Rng) -> Rng { ++pub fn shuffle_front(pool: &mut Pool, front: usize, count: usize, rng: Rng) -> Rng { + (0..count).fold(rng, |rng, i| { + let (offset, rng) = rng.below((pool.len() - front - i) as u64); + pool.swap(front + i, front + i + offset as usize); +@@ -21,11 +56,11 @@ pub fn shuffle_front(pool: &mut [Card], front: usize, count: usize, rng: Rng) -> + /// Deals `count` cards at `front`, re-sampling while `accept` refuses (bounded). + /// Fallback: after `MAX_FILTER_ATTEMPTS` refusals the last sample is kept, i.e. a range that + /// (almost) never matches degrades to a uniformly random hand instead of failing the run. +-pub fn deal(pool: &mut [Card], front: usize, count: usize, accept: &dyn Fn(&[Card]) -> bool, rng: Rng) -> Rng { ++pub fn deal(pool: &mut Pool, front: usize, count: usize, accept: &dyn Fn(&[Card]) -> bool, rng: Rng) -> Rng { + let mut rng = rng; + for _ in 0..MAX_FILTER_ATTEMPTS { + rng = shuffle_front(pool, front, count, rng); +- if accept(&pool[front..front + count]) { ++ if accept(&pool.cards[front..front + count]) { + break; + } + } +@@ -35,16 +70,20 @@ pub fn deal(pool: &mut [Card], front: usize, count: usize, accept: &dyn Fn(&[Car + /// Deals one of `combos` at `front`: a uniformly chosen hand, re-chosen while one of its + /// cards is gone (dead or dealt), bounded by `MAX_FILTER_ATTEMPTS`. Fallback: an empty list, + /// or no hand left after the attempts, deals `count` random cards instead. +-pub fn deal_combo(pool: &mut [Card], front: usize, count: usize, combos: &[Vec], rng: Rng) -> Rng { ++pub fn deal_combo(pool: &mut Pool, front: usize, count: usize, combos: &[Vec], rng: Rng) -> Rng { + let mut rng = rng; + for _ in 0..if combos.is_empty() { 0 } else { MAX_FILTER_ATTEMPTS } { + let (i, next) = rng.below(combos.len() as u64); + rng = next; + let combo = &combos[i as usize]; +- let available = combo.len() == count && combo.iter().all(|c| pool[front..].contains(c)); ++ // In `pool[front..]`: in the pool, at or behind `front`. ++ let available = combo.len() == count && combo.iter().all(|c| pool.at[c.index() as usize] as usize >= front && pool.at[c.index() as usize] != u8::MAX); + if available { + for (k, card) in combo.iter().enumerate() { +- let at = front + k + pool[front + k..].iter().position(|p| p == card).unwrap_or(0); ++ // The card's place if it is in `pool[front + k..]`, else `front + k` (a no-op swap): ++ // what the scan `front + k + position(..).unwrap_or(0)` gave. ++ let p = pool.at[card.index() as usize] as usize; ++ let at = if p >= front + k && p < pool.len() && pool.cards[p] == *card { p } else { front + k }; + pool.swap(front + k, at); + } + return rng; +diff --git a/src/hand/showdown.rs b/src/hand/showdown.rs +index d907801..3429a85 100644 +--- a/src/hand/showdown.rs ++++ b/src/hand/showdown.rs +@@ -1,27 +1,45 @@ + //! Best hand for a player under the variant's hole-card usage rule. + + use super::five::{evaluate, evaluate_in}; ++use super::category::Category; + use super::strength::Strength; + use super::subset::{masks, pick}; + use crate::card::Card; + use crate::fault::Fault; +-use crate::variant::{HoleUsage, Rules}; ++use crate::variant::{DeckRule, HandRanking, HoleUsage, Rules}; + + /// Standard rules on the full deck: ace low in A-2-3-4-5, full house beats flush. + /// Hold'em family: 5-7 cards in total. Omaha family: >= 2 hole and 3-5 board cards. + /// Variants with their own deck or ladder go through `judge`. + pub fn best(usage: HoleUsage, hole: &[Card], board: &[Card]) -> Result { + distinct(hole, board)?; ++ if matches!(usage, HoleUsage::BestFiveOfAll) { ++ return best_of_all_standard(hole, board); ++ } + select(usage, &evaluate, hole, board) + } + ++/// `best_of_all(evaluate, ..)` by the direct evaluator: same checks, same value. ++fn best_of_all_standard(hole: &[Card], board: &[Card]) -> Result { ++ if !(5..=7).contains(&(hole.len() + board.len())) || hole.is_empty() { ++ return Err(invalid("hold'em needs 5 to 7 cards including hole cards")); ++ } ++ Ok(best_standard(hole.iter().chain(board).copied())) ++} ++ + fn invalid(detail: &str) -> Fault { + Fault::Invalid { field: "cards".into(), detail: detail.into() } + } + + fn distinct(hole: &[Card], board: &[Card]) -> Result<(), Fault> { +- let all: Vec = hole.iter().chain(board).copied().collect(); +- let repeated = all.iter().enumerate().any(|(i, c)| all[..i].contains(c)); ++ // One bit per card (`index` is unique per rank and suit): a repeat finds its bit set. ++ let mut seen = 0u64; ++ let mut repeated = false; ++ for c in hole.iter().chain(board) { ++ let bit = 1u64 << c.index(); ++ repeated |= seen & bit != 0; ++ seen |= bit; ++ } + if repeated { + Err(Fault::Inconsistent("duplicate card".into())) + } else { +@@ -29,6 +47,122 @@ fn distinct(hole: &[Card], board: &[Card]) -> Result<(), Fault> { + } + } + ++/// The best five of 5 to 7 distinct cards under standard rules (full deck, standard ladder), without ++/// enumerating subsets: the same `Strength` as `best_five_of(evaluate, ..)`, value for value (checked ++/// against it on every 5-, 6- and 7-card hand, `tests::the_direct_evaluator_equals_enumeration_everywhere`). ++fn best_standard(cards: impl Iterator) -> Strength { ++ best_of_lanes(lanes(cards)) ++} ++ ++/// One 13-bit lane per suit, bit `value - 2`. ++fn lanes(cards: impl Iterator) -> [u32; 4] { ++ let mut s = [0u32; 4]; ++ for c in cards { ++ s[c.suit as usize] |= 1 << (c.rank.value() - 2); ++ } ++ s ++} ++ ++/// The suit lanes of a five-card board when `rules` are standard hold'em (two hole cards, best five ++/// of all, full deck, standard ladder) - the case `best_with_board` serves - else `None`. ++pub fn holdem_lanes(rules: &Rules, board: &[Card; 5]) -> Option<[u32; 4]> { ++ (rules.hole_cards == 2 && matches!(rules.hole_usage, HoleUsage::BestFiveOfAll) && standard(rules.deck, rules.ranking)) ++ .then(|| lanes(board.iter().copied())) ++} ++ ++/// The best five of a two-card `hole` and the board given as its lanes (`holdem_lanes`), for a caller ++/// that guarantees the seven cards are distinct: the `Strength` `judge` gives them under standard ++/// hold'em rules. ++pub fn best_with_board(board: &[u32; 4], hole: &[Card]) -> Strength { ++ let mut s = *board; ++ for c in hole { ++ s[c.suit as usize] |= 1 << (c.rank.value() - 2); ++ } ++ best_of_lanes(s) ++} ++ ++fn best_of_lanes(s: [u32; 4]) -> Strength { ++ let v = |bit: u32| bit as u8 + 2; ++ let high = |bits: u32| 31 - bits.leading_zeros(); ++ // The `n` highest ranks of `bits` as values, most significant first. ++ let top = |mut bits: u32, out: &mut [u8; 5], from: usize, n: usize| { ++ for slot in out.iter_mut().skip(from).take(n) { ++ if bits == 0 { ++ break; ++ } ++ let h = high(bits); ++ *slot = v(h); ++ bits &= !(1 << h); ++ } ++ }; ++ // Top rank index of the highest five-run (ace also below the deuce), `None` without one. ++ let straight = |ranks: u32| { ++ let b = (ranks << 1) | ((ranks >> 12) & 1); ++ let run = b & (b >> 1) & (b >> 2) & (b >> 3) & (b >> 4); ++ (run != 0).then(|| 31 - run.leading_zeros() + 3) ++ }; ++ let mk = |c: Category, r: [u8; 5]| Strength::new(HandRanking::Standard, c, r); ++ let mut r = [0u8; 5]; ++ for lane in s { ++ if lane.count_ones() >= 5 { ++ return match straight(lane) { ++ Some(t) => mk(Category::StraightFlush, [v(t), 0, 0, 0, 0]), ++ None => { ++ top(lane, &mut r, 0, 5); ++ mk(Category::Flush, r) ++ } ++ }; ++ } ++ } ++ let ranks = s[0] | s[1] | s[2] | s[3]; ++ let four = s[0] & s[1] & s[2] & s[3]; ++ if four != 0 { ++ let q = high(four); ++ r[0] = v(q); ++ top(ranks & !(1 << q), &mut r, 1, 1); ++ return mk(Category::FourOfAKind, r); ++ } ++ let three = (s[0] & s[1] & s[2]) | (s[0] & s[1] & s[3]) | (s[0] & s[2] & s[3]) | (s[1] & s[2] & s[3]); ++ let two = (s[0] & s[1]) | (s[0] & s[2]) | (s[0] & s[3]) | (s[1] & s[2]) | (s[1] & s[3]) | (s[2] & s[3]); ++ if three != 0 { ++ let t = high(three); ++ let pair = two & !(1 << t); ++ if pair != 0 { ++ return mk(Category::FullHouse, [v(t), v(high(pair)), 0, 0, 0]); ++ } ++ } ++ if let Some(t) = straight(ranks) { ++ return mk(Category::Straight, [v(t), 0, 0, 0, 0]); ++ } ++ if three != 0 { ++ let t = high(three); ++ r[0] = v(t); ++ top(ranks & !(1 << t), &mut r, 1, 2); ++ return mk(Category::ThreeOfAKind, r); ++ } ++ if two.count_ones() >= 2 { ++ let hi = high(two); ++ let lo = high(two & !(1 << hi)); ++ r[0] = v(hi); ++ r[1] = v(lo); ++ top(ranks & !(1 << hi) & !(1 << lo), &mut r, 2, 1); ++ return mk(Category::TwoPair, r); ++ } ++ if two != 0 { ++ let p = high(two); ++ r[0] = v(p); ++ top(ranks & !(1 << p), &mut r, 1, 3); ++ return mk(Category::Pair, r); ++ } ++ top(ranks, &mut r, 0, 5); ++ mk(Category::HighCard, r) ++} ++ ++/// Standard rules: full deck and standard ladder (the direct evaluator applies). ++fn standard(deck: DeckRule, ranking: HandRanking) -> bool { ++ deck == DeckRule::FULL && ranking == HandRanking::Standard ++} ++ + fn select( + usage: HoleUsage, + eval: &dyn Fn(&[Card; 5]) -> Strength, +@@ -46,6 +180,11 @@ fn best_of_all(eval: &dyn Fn(&[Card; 5]) -> Strength, hole: &[Card], board: &[Ca + if !(5..=7).contains(&all.len()) || hole.is_empty() { + return Err(invalid("hold'em needs 5 to 7 cards including hole cards")); + } ++ best_five_of(eval, &all) ++} ++ ++/// The best five-card subset of `all` (5 to 7 distinct cards) under `eval`, by enumeration. ++fn best_five_of(eval: &dyn Fn(&[Card; 5]) -> Strength, all: &[Card]) -> Result { + masks(all.len(), 5) + .filter_map(|m| pick::<5>(&all, m)) + .map(|five| eval(&five)) +@@ -81,6 +220,93 @@ pub fn judge(rules: &Rules, hole: &[Card], board: &[Card]) -> Result Vec { ++ Card::parse_list("2c 3c 4c 5c 6c 7c 8c 9c Tc Jc Qc Kc Ac 2d 3d 4d 5d 6d 7d 8d 9d Td Jd Qd Kd Ad 2h 3h 4h 5h 6h 7h 8h 9h Th Jh Qh Kh Ah 2s 3s 4s 5s 6s 7s 8s 9s Ts Js Qs Ks As").unwrap() ++ } ++ ++ /// Every hand of `n` cards whose lowest card index is in `firsts`: the direct evaluator against ++ /// enumeration; returns the number checked. ++ fn every_hand(n: usize, firsts: impl Iterator) -> u64 { ++ let d = deck(); ++ let mut checked = 0u64; ++ let mut idx = vec![0usize; n]; ++ for f in firsts { ++ idx[0] = f; ++ // Odometer over the remaining n-1 strictly increasing indices. ++ for (j, slot) in idx.iter_mut().enumerate().skip(1) { ++ *slot = f + j; ++ } ++ if idx[n - 1] >= 52 { ++ continue; ++ } ++ loop { ++ let cards: Vec = idx.iter().map(|i| d[*i]).collect(); ++ let want = best_five_of(&evaluate, &cards).unwrap(); ++ let got = best_standard(cards.iter().copied()); ++ assert_eq!(got, want, "{:?}", cards.iter().map(|c| c.short()).collect::>()); ++ checked += 1; ++ // Advance (position 0 stays fixed). ++ let mut p = n - 1; ++ loop { ++ if p == 0 { ++ break; ++ } ++ if idx[p] < 52 - (n - p) { ++ idx[p] += 1; ++ for q in p + 1..n { ++ idx[q] = idx[q - 1] + 1; ++ } ++ break; ++ } ++ p -= 1; ++ } ++ if p == 0 { ++ break; ++ } ++ } ++ } ++ checked ++ } ++ ++ /// Every 5-card hand (fast enough for the normal suite). ++ #[test] ++ fn the_direct_evaluator_equals_enumeration_on_every_five_card_hand() { ++ assert_eq!(every_hand(5, 0..52), 2_598_960); ++ } ++ ++ #[test] ++ fn the_direct_evaluator_knows_wheel_and_steel_wheel() { ++ let c = |t: &str| Card::parse_list(t).unwrap(); ++ let w = best(HoleUsage::BestFiveOfAll, &c("Ah 2d"), &c("3c 4s 5h Kd Kc")).unwrap(); ++ assert_eq!((w.category, w.ranks), (Category::Straight, [5, 0, 0, 0, 0])); ++ let sf = best(HoleUsage::BestFiveOfAll, &c("Ah 2h"), &c("3h 4h 5h 6d 6c")).unwrap(); ++ assert_eq!((sf.category, sf.ranks), (Category::StraightFlush, [5, 0, 0, 0, 0])); ++ } ++ ++ /// Every 6- and 7-card hand (154 M), split over `PERF_THREADS` threads (default 2): ++ /// `cargo test --release the_direct_evaluator_equals_enumeration_everywhere -- --ignored --nocapture` ++ #[test] ++ #[ignore] ++ fn the_direct_evaluator_equals_enumeration_everywhere() { ++ let th: usize = std::env::var("PERF_THREADS").ok().and_then(|x| x.parse().ok()).unwrap_or(2); ++ for n in [6, 7] { ++ let total: u64 = std::thread::scope(|s| { ++ let hs: Vec<_> = (0..th).map(|t| s.spawn(move || every_hand(n, (0..52).filter(move |f| f % th == t)))).collect(); ++ hs.into_iter().map(|h| h.join().unwrap()).sum() ++ }); ++ eprintln!("{n} cards: {total} hands identical"); ++ assert_eq!(total, if n == 6 { 20_358_520 } else { 133_784_560 }); ++ } ++ } ++} +diff --git a/src/read/straight_draw.rs b/src/read/straight_draw.rs +index 4e0f46a..466a733 100644 +--- a/src/read/straight_draw.rs ++++ b/src/read/straight_draw.rs +@@ -12,9 +12,34 @@ use crate::variant::{HoleUsage, Rules}; + + /// How many different ranks complete a straight for hero. + pub fn completing_ranks(rules: &Rules, census: &Census) -> u32 { ++ // The deck's windows once (at most 10), not once per rank. ++ let mut ws = [0u16; 16]; ++ let mut n = 0; ++ for w in windows(rules.deck) { ++ ws[n] = w; ++ n += 1; ++ } ++ let ws = &ws[..n]; ++ if matches!(rules.hole_usage, HoleUsage::BestFiveOfAll) { ++ // Rank `x` completes window `w` iff `x` is the one rank of `w` that hole + board lack and a ++ // hole rank in `w` is not on the board (the `completes` conditions, solved for `x`); so the ++ // completing ranks are the union, over windows missing exactly one rank, of that rank. ++ let (hole, board) = (census.hole_mask, census.board_mask); ++ let have = hole | board; ++ let done = ws.iter().fold(0u16, |done, &w| { ++ let missing = w & !have; ++ if missing.count_ones() == 1 && w & !board & !missing != 0 { done | missing } else { done } ++ }); ++ return (rules.deck.lowest.value()..=14u8).filter(|&pip| done & bit(pip) != 0 && census.total_count(pip) < 4).count() as u32; ++ } ++ scan(rules, census, ws) ++} ++ ++/// Every rank against every window (the definition; Omaha, and the reference for hold'em). ++fn scan(rules: &Rules, census: &Census, ws: &[u16]) -> u32 { + (rules.deck.lowest.value()..=14u8) + .filter(|&pip| census.total_count(pip) < 4) +- .filter(|&pip| windows(rules.deck).any(|w| completes(rules.hole_usage, census, w, bit(pip)))) ++ .filter(|&pip| ws.iter().any(|&w| completes(rules.hole_usage, census, w, bit(pip)))) + .count() as u32 + } + +@@ -59,3 +84,79 @@ fn backdoor_in(usage: HoleUsage, census: &Census, window: u16) -> bool { + } + } + } ++ ++#[cfg(test)] ++mod perf_tests { ++ use super::*; ++ use crate::card::{Card, Rank, Suit}; ++ use crate::variant::{rules as rules_of, Variant}; ++ ++ /// The hold'em shortcut counts what the scan counts, on every rank pattern of two hole cards and a ++ /// flop, turn or river board (suits do not matter to straights), full and short deck. ++ #[test] ++ fn the_holdem_shortcut_equals_the_scan_on_every_rank_pattern() { ++ let ranks = [Rank::Two, Rank::Three, Rank::Four, Rank::Five, Rank::Six, Rank::Seven, Rank::Eight, Rank::Nine, Rank::Ten, Rank::Jack, Rank::Queen, Rank::King, Rank::Ace]; ++ let suits = [Suit::Clubs, Suit::Diamonds, Suit::Hearts, Suit::Spades]; ++ let mut checked = 0; ++ for variant in [Variant::Nlhe, Variant::ShortDeck] { ++ let rules = rules_of(variant); ++ let low = ranks.iter().position(|r| rules.deck.contains(*r)).unwrap(); ++ let deck = &ranks[low..]; ++ for n in 5..=7usize { ++ // Non-decreasing rank index sequences of length n, each rank at most four times. ++ let mut idx = vec![0usize; n]; ++ loop { ++ let mut used = [0usize; 13]; ++ let ok = idx.iter().all(|i| { ++ used[*i] += 1; ++ used[*i] <= 4 ++ }); ++ if ok { ++ // Every split into two hole cards and the board. ++ for a in 0..n { ++ for b in a + 1..n { ++ let mut seen = [0usize; 13]; ++ let cards: Vec = idx ++ .iter() ++ .map(|i| { ++ seen[*i] += 1; ++ Card { rank: deck[*i], suit: suits[seen[*i] - 1] } ++ }) ++ .collect(); ++ let hole = [cards[a], cards[b]]; ++ let board: Vec = (0..n).filter(|k| *k != a && *k != b).map(|k| cards[k]).collect(); ++ let census = Census::of(&hole, &board); ++ let ws: Vec = windows(rules.deck).collect(); ++ assert_eq!(completing_ranks(&rules, &census), scan(&rules, &census, &ws), "{hole:?} {board:?}"); ++ checked += 1; ++ } ++ } ++ } ++ // Next non-decreasing sequence. ++ let mut p = n; ++ loop { ++ if p == 0 { ++ break; ++ } ++ p -= 1; ++ if idx[p] + 1 < deck.len() { ++ idx[p] += 1; ++ for q in p + 1..n { ++ idx[q] = idx[p]; ++ } ++ break; ++ } ++ if p == 0 { ++ p = usize::MAX; ++ break; ++ } ++ } ++ if p == usize::MAX { ++ break; ++ } ++ } ++ } ++ } ++ assert!(checked > 100_000, "{checked}"); ++ } ++} diff --git a/messung_perf/sprofA.out.err b/messung_perf/sprofA.out.err new file mode 100644 index 00000000..be5f92cb --- /dev/null +++ b/messung_perf/sprofA.out.err @@ -0,0 +1,2 @@ +36.84 s, 29562 engine calls, 1.246 ms/call +24116 samples -> messung_perf/sprofA.txt diff --git a/messung_perf/sprofA.report.txt b/messung_perf/sprofA.report.txt new file mode 100644 index 00000000..c1871852 --- /dev/null +++ b/messung_perf/sprofA.report.txt @@ -0,0 +1,107 @@ +24116 samples + +== self (innermost function) == + 12.65% show + 9.70% ?? + 5.91% best_of_lanes + 4.77% walk + 3.99% matched + 3.77% count_ones + 3.72% {closure#0} + 3.21% add_assign + 2.87% deal_combo + 2.35% leading_zeros + 2.22% lt + 2.15% swap + 2.10% {closure#2} + 2.04% index + 2.03% play_trial + 1.90% then<[u32; 4], rechner::hand::showdown::holdem_lanes::{closure_env#0}> + 1.76% best_with_board + 1.45% {closure#3} + 1.35% non_null + 1.31% write + 1.23% next, core::slice::iter::IterMut> + 1.21% index + 1.14% fold>> + 0.97% next, core::slice::iter::ChunksMut> + 0.93% as_slice + +== self by line == + 9.26% ?? @??:0 + 3.77% count_ones @uint_macros.rs:85 + 3.04% add_assign @arith.rs:790 + 2.81% show @turn_river_game.rs:? + 2.35% leading_zeros @uint_macros.rs:154 + 2.28% matched @turn_river_game.rs:310 + 2.04% index @playing_card.rs:16 + 2.01% lt @cmp.rs:2144 + 1.90% then<[u32; 4], rechner::hand::showdown::holdem_lanes::{closure_env#0}> @bool.rs:66 + 1.89% walk @turn_river_game.rs:634 + 1.88% swap @sample.rs:42 + 1.57% show @turn_river_game.rs:571 + 1.35% non_null @mod.rs:611 + 1.31% write @mod.rs:1963 + 1.30% {closure#0} @turn_river_game.rs:514 + 1.29% matched @zip.rs:? + 1.19% walk @turn_river_game.rs:635 + 1.18% index @index.rs:238 + 1.05% best_of_lanes @showdown.rs:155 + 1.03% next, core::slice::iter::IterMut> @zip.rs:300 + 0.96% show @turn_river_game.rs:551 + 0.93% as_slice @mod.rs:1865 + 0.92% fold>> @macros.rs:279 + 0.87% show @turn_river_game.rs:568 + 0.86% best_of_lanes @showdown.rs:149 + +== inclusive == +100.00% __rust_begin_short_backtrace +100.00% std::panicking::catch_unwind::do_call::<&dyn core::ops::function::Fn<> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe, i32> +100.00% std::panicking::catch_unwind::do_call:: +100.00% std::panic::catch_unwind::<&dyn core::ops::function::Fn<> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe, i32> +100.00% call_once +100.00% ?? +100.00% <&dyn core::ops::function::Fn<> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe as core::ops::function::FnOnce<>>::call_once +100.00% std::panicking::catch_unwind:: +100.00% std::panicking::catch_unwind:: + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe> +100.00% std::rt::lang_start_internal +100.00% main +100.00% std::rt::lang_start_internal::{closure#0} +100.00% std::panic::catch_unwind:: + 99.95% lbr_hand + 99.95% hand + 99.89% {closure#0} + 99.88% or_insert_with<(usize, usize), alloc::vec::Vec<>, alloc::alloc::Global, rechner::blueprint::lbr::hand::{closure#0}::{closure_env#0}<>> + 99.88% or_try_insert_with<(usize, usize), alloc::vec::Vec<>, alloc::alloc::Global, std::collections::hash::map::{impl#72}::or_insert_with::{closure_env#0}<(usize, usize), alloc::vec::Vec<>, alloc::alloc::Global, rechner::blueprint::lbr::hand::{closure#0}::{closure_env#0}<>>, !> + 99.87% {closure#0}<(usize, usize), alloc::vec::Vec<>, alloc::alloc::Global, rechner::blueprint::lbr::hand::{closure#0}::{closure_env#0}<>> + 99.86% zeile + 99.66% {closure#0} + 99.64% zeile_und_entscheidung + 99.51% and_then<(rechner::game::spot::Spot, f64), usize, rechner::blueprint::engine_gegner::{impl#2}::zeile_und_entscheidung::{closure_env#0}> + 99.49% decide_with + 99.49% decide + 99.38% think + 99.37% postflop + 76.04% {closure#1} + 55.05% iterate + 55.02% walk + 52.94% collect>, rechner::cfr::turn_river_game::{impl#3}::walk::{closure_env#1}>, alloc::vec::Vec, alloc::alloc::Global>> + 52.94% from_iter, core::iter::adapters::map::Map>, rechner::cfr::turn_river_game::{impl#3}::walk::{closure_env#1}>> + 52.92% fold, (), core::iter::adapters::map::map_fold::{closure_env#0}<(usize, &usize), alloc::vec::Vec<>, (), rechner::cfr::turn_river_game::{impl#3}::walk::{closure_env#1}, core::iter::traits::iterator::Iterator::for_each::call::{closure_env#0}, alloc::vec::{impl#22}::extend_trusted::{closure_env#0}, alloc::alloc::Global, core::iter::adapters::map::Map>, rechner::cfr::turn_river_game::{impl#3}::walk::{closure_env#1}>>>>> + 52.92% fold, (), rechner::cfr::turn_river_game::{impl#3}::walk::{closure_env#1}, core::iter::traits::iterator::Iterator::for_each::call::{closure_env#0}, alloc::vec::{impl#22}::extend_trusted::{closure_env#0}, alloc::alloc::Global, core::iter::adapters::map::Map>, rechner::cfr::turn_river_game::{impl#3}::walk::{closure_env#1}>>>>>> + 52.92% spec_extend, core::iter::adapters::map::Map>, rechner::cfr::turn_river_game::{impl#3}::walk::{closure_env#1}>, alloc::alloc::Global> + 52.92% for_each>, rechner::cfr::turn_river_game::{impl#3}::walk::{closure_env#1}>, alloc::vec::{impl#22}::extend_trusted::{closure_env#0}, alloc::alloc::Global, core::iter::adapters::map::Map>, rechner::cfr::turn_river_game::{impl#3}::walk::{closure_env#1}>>> + 52.92% {closure#0}<&usize, (), core::iter::adapters::map::map_fold::{closure_env#0}<(usize, &usize), alloc::vec::Vec<>, (), rechner::cfr::turn_river_game::{impl#3}::walk::{closure_env#1}, core::iter::traits::iterator::Iterator::for_each::call::{closure_env#0}, alloc::vec::{impl#22}::extend_trusted::{closure_env#0}, alloc::alloc::Global, core::iter::adapters::map::Map>, rechner::cfr::turn_river_game::{impl#3}::walk::{closure_env#1}>>>>> + 52.92% {closure#0}<(usize, &usize), alloc::vec::Vec<>, (), rechner::cfr::turn_river_game::{impl#3}::walk::{closure_env#1}, core::iter::traits::iterator::Iterator::for_each::call::{closure_env#0}, alloc::vec::{impl#22}::extend_trusted::{closure_env#0}, alloc::alloc::Global, core::iter::adapters::map::Map>, rechner::cfr::turn_river_game::{impl#3}::walk::{closure_env#1}>>>> + 52.92% fold, core::iter::adapters::enumerate::Enumerate>, rechner::cfr::turn_river_game::{impl#3}::walk::{closure_env#1}, (), core::iter::traits::iterator::Iterator::for_each::call::{closure_env#0}, alloc::vec::{impl#22}::extend_trusted::{closure_env#0}, alloc::alloc::Global, core::iter::adapters::map::Map>, rechner::cfr::turn_river_game::{impl#3}::walk::{closure_env#1}>>>> + 52.92% extend_trusted, alloc::alloc::Global, core::iter::adapters::map::Map>, rechner::cfr::turn_river_game::{impl#3}::walk::{closure_env#1}>> + 36.89% estimate + 36.54% try_fold, (rechner::equity::tally::Tally, rechner::rng::split_mix::Rng), rechner::equity::monte_carlo::estimate::{closure_env#0}, core::result::Result<>> + 36.13% play_trial + 33.61% turn_game_decision + 33.50% solve_core + 33.44% run + 21.69% river_spieler_decision + 21.64% solve_river + 20.72% {closure#2} + 20.37% called_equity diff --git a/messung_perf/sprofAB.out.err b/messung_perf/sprofAB.out.err new file mode 100644 index 00000000..893e8d9b --- /dev/null +++ b/messung_perf/sprofAB.out.err @@ -0,0 +1,2 @@ +318.86 s, 11945 engine calls, 26.694 ms/call +209511 samples -> messung_perf/sprofAB.txt diff --git a/messung_perf/sprofAB.report.txt b/messung_perf/sprofAB.report.txt new file mode 100644 index 00000000..23342589 --- /dev/null +++ b/messung_perf/sprofAB.report.txt @@ -0,0 +1,107 @@ +209511 samples + +== self (innermost function) == + 21.90% show + 12.26% ?? + 8.56% walk + 6.86% matched + 5.04% add_assign + 4.46% {closure#0} + 2.49% lt + 2.44% fold>> + 2.41% non_null + 2.15% write + 2.06% index + 1.73% next, core::slice::iter::ChunksMut> + 1.64% next, core::slice::iter::IterMut> + 1.55% as_slice + 1.38% {closure#3} + 1.12% index + 1.10% index<(usize, usize)> + 1.03% max + 0.96% non_null + 0.88% {closure#2} + 0.87% spec_next + 0.85% as_slice + 0.81% as_slice<(usize, usize), alloc::alloc::Global> + 0.80% div + 0.76% index_mut + +== self by line == + 11.76% ?? @??:0 + 5.23% show @turn_river_game.rs:? + 4.65% add_assign @arith.rs:790 + 3.24% matched @turn_river_game.rs:310 + 3.13% walk @turn_river_game.rs:634 + 2.74% show @turn_river_game.rs:571 + 2.69% matched @zip.rs:? + 2.48% lt @cmp.rs:2144 + 2.41% non_null @mod.rs:611 + 2.30% walk @turn_river_game.rs:635 + 2.24% {closure#0} @turn_river_game.rs:514 + 2.15% write @mod.rs:1963 + 2.01% index @index.rs:238 + 1.93% fold>> @macros.rs:279 + 1.78% show @turn_river_game.rs:551 + 1.77% show @turn_river_game.rs:568 + 1.57% show @turn_river_game.rs:570 + 1.47% as_slice @mod.rs:1865 + 1.37% next, core::slice::iter::IterMut> @zip.rs:300 + 1.35% {closure#3} @turn_river_game.rs:642 + 1.24% show @turn_river_game.rs:547 + 1.24% show @turn_river_game.rs:569 + 1.12% {closure#0} @turn_river_game.rs:625 + 1.12% index @index.rs:238 + 1.10% index<(usize, usize)> @index.rs:238 + +== inclusive == +100.00% call_once +100.00% std::panic::catch_unwind::<&dyn core::ops::function::Fn<> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe, i32> +100.00% ?? +100.00% std::rt::lang_start_internal +100.00% std::panicking::catch_unwind:: +100.00% std::panic::catch_unwind:: +100.00% std::panicking::catch_unwind::do_call:: +100.00% <&dyn core::ops::function::Fn<> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe as core::ops::function::FnOnce<>>::call_once +100.00% __rust_begin_short_backtrace +100.00% std::panicking::catch_unwind::do_call::<&dyn core::ops::function::Fn<> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe, i32> +100.00% std::panicking::catch_unwind:: + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe> +100.00% main +100.00% std::rt::lang_start_internal::{closure#0} +100.00% lbr_hand +100.00% hand + 99.99% {closure#0} + 99.99% or_insert_with<(usize, usize), alloc::vec::Vec<>, alloc::alloc::Global, rechner::blueprint::lbr::hand::{closure#0}::{closure_env#0}<>> + 99.99% or_try_insert_with<(usize, usize), alloc::vec::Vec<>, alloc::alloc::Global, std::collections::hash::map::{impl#72}::or_insert_with::{closure_env#0}<(usize, usize), alloc::vec::Vec<>, alloc::alloc::Global, rechner::blueprint::lbr::hand::{closure#0}::{closure_env#0}<>>, !> + 99.99% zeile + 99.99% {closure#0}<(usize, usize), alloc::vec::Vec<>, alloc::alloc::Global, rechner::blueprint::lbr::hand::{closure#0}::{closure_env#0}<>> + 99.99% {closure#0} + 99.98% zeile_und_entscheidung + 99.98% and_then<(rechner::game::spot::Spot, f64), usize, rechner::blueprint::engine_gegner::{impl#2}::zeile_und_entscheidung::{closure_env#0}> + 99.98% decide + 99.98% decide_with + 99.97% think + 99.97% postflop + 98.37% {closure#1} + 97.89% solve_core + 97.80% iterate + 97.78% walk + 97.34% from_iter, core::iter::adapters::map::Map>, rechner::cfr::turn_river_game::{impl#3}::walk::{closure_env#1}>> + 97.34% collect>, rechner::cfr::turn_river_game::{impl#3}::walk::{closure_env#1}>, alloc::vec::Vec, alloc::alloc::Global>> + 97.33% for_each>, rechner::cfr::turn_river_game::{impl#3}::walk::{closure_env#1}>, alloc::vec::{impl#22}::extend_trusted::{closure_env#0}, alloc::alloc::Global, core::iter::adapters::map::Map>, rechner::cfr::turn_river_game::{impl#3}::walk::{closure_env#1}>>> + 97.33% extend_trusted, alloc::alloc::Global, core::iter::adapters::map::Map>, rechner::cfr::turn_river_game::{impl#3}::walk::{closure_env#1}>> + 97.33% spec_extend, core::iter::adapters::map::Map>, rechner::cfr::turn_river_game::{impl#3}::walk::{closure_env#1}>, alloc::alloc::Global> + 97.33% fold, core::iter::adapters::enumerate::Enumerate>, rechner::cfr::turn_river_game::{impl#3}::walk::{closure_env#1}, (), core::iter::traits::iterator::Iterator::for_each::call::{closure_env#0}, alloc::vec::{impl#22}::extend_trusted::{closure_env#0}, alloc::alloc::Global, core::iter::adapters::map::Map>, rechner::cfr::turn_river_game::{impl#3}::walk::{closure_env#1}>>>> + 97.33% fold, (), core::iter::adapters::map::map_fold::{closure_env#0}<(usize, &usize), alloc::vec::Vec<>, (), rechner::cfr::turn_river_game::{impl#3}::walk::{closure_env#1}, core::iter::traits::iterator::Iterator::for_each::call::{closure_env#0}, alloc::vec::{impl#22}::extend_trusted::{closure_env#0}, alloc::alloc::Global, core::iter::adapters::map::Map>, rechner::cfr::turn_river_game::{impl#3}::walk::{closure_env#1}>>>>> + 97.33% fold, (), rechner::cfr::turn_river_game::{impl#3}::walk::{closure_env#1}, core::iter::traits::iterator::Iterator::for_each::call::{closure_env#0}, alloc::vec::{impl#22}::extend_trusted::{closure_env#0}, alloc::alloc::Global, core::iter::adapters::map::Map>, rechner::cfr::turn_river_game::{impl#3}::walk::{closure_env#1}>>>>>> + 97.33% {closure#0}<&usize, (), core::iter::adapters::map::map_fold::{closure_env#0}<(usize, &usize), alloc::vec::Vec<>, (), rechner::cfr::turn_river_game::{impl#3}::walk::{closure_env#1}, core::iter::traits::iterator::Iterator::for_each::call::{closure_env#0}, alloc::vec::{impl#22}::extend_trusted::{closure_env#0}, alloc::alloc::Global, core::iter::adapters::map::Map>, rechner::cfr::turn_river_game::{impl#3}::walk::{closure_env#1}>>>>> + 97.33% {closure#0}<(usize, &usize), alloc::vec::Vec<>, (), rechner::cfr::turn_river_game::{impl#3}::walk::{closure_env#1}, core::iter::traits::iterator::Iterator::for_each::call::{closure_env#0}, alloc::vec::{impl#22}::extend_trusted::{closure_env#0}, alloc::alloc::Global, core::iter::adapters::map::Map>, rechner::cfr::turn_river_game::{impl#3}::walk::{closure_env#1}>>>> + 97.28% turn_solver_decision + 96.55% solve_turn + 32.81% show + 14.68% matched + 9.27% disjoint + 8.07% try_allocate_in + 7.81% alloc_impl + 7.81% alloc_impl_runtime + 5.98% collect, rechner::cfr::turn_river_game::{impl#3}::disjoint::{closure_env#0}>, alloc::vec::Vec<>> diff --git a/messung_perf/sprofC.out.err b/messung_perf/sprofC.out.err new file mode 100644 index 00000000..f2a97c0d --- /dev/null +++ b/messung_perf/sprofC.out.err @@ -0,0 +1,4 @@ +49.17 s, 80 engine calls, 614.655 ms/call +zeit board=3 flop-solver alle: n 80 p50 1004.43 ms p99 1342.11 ms max 1349.28 ms +zeit board=3 flop-solver live: n 1 p50 1233.69 ms p99 1233.69 ms max 1233.69 ms +31997 samples -> sprofC.txt diff --git a/messung_perf/sprofC.report.txt b/messung_perf/sprofC.report.txt new file mode 100644 index 00000000..bdd201f9 --- /dev/null +++ b/messung_perf/sprofC.report.txt @@ -0,0 +1,127 @@ +31997 samples + +== self (innermost function) == + 19.69% ?? + 17.18% {closure#1} + 9.90% walk + 7.34% fold>> + 6.22% split_at_checked + 5.40% matched + 2.68% next, core::slice::iter::ChunksMut> + 2.65% fold_into + 2.39% eq + 2.21% add_assign + 2.13% fold>> + 2.00% next, core::slice::iter::IterMut> + 1.85% index + 1.12% max + 1.06% min + 1.02% write + 0.98% non_null + 0.90% {closure#0} + 0.89% offset_from_unsigned + 0.84% lt + 0.68% next, core::slice::iter::Iter> + 0.63% div + 0.56% increment_len + 0.51% spec_next + 0.48% as_mut_slice + 0.40% drop + 0.39% clone + 0.36% map_or + 0.36% fold, f64, core::iter::adapters::map::map_fold::{closure_env#0}, rechner::cfr::turn_river_game::{impl#3}::walk::{closure_env#0}>>>> + 0.35% non_null> + +== self by line == + 19.45% ?? @??:0 + 15.21% {closure#1} @turn_river_game.rs:449 + 7.34% fold>> @macros.rs:28 + 6.08% split_at_checked @mod.rs:2163 + 3.68% matched @turn_river_game.rs:313 + 2.39% eq @non_null.rs:1663 + 2.33% walk @turn_river_game.rs:678 + 2.04% next, core::slice::iter::ChunksMut> @zip.rs:304 + 2.01% add_assign @arith.rs:790 + 1.88% fold>> @macros.rs:279 + 1.82% {closure#1} @turn_river_game.rs:456 + 1.80% index @index.rs:238 + 1.77% next, core::slice::iter::IterMut> @zip.rs:300 + 1.66% walk @turn_river_game.rs:679 + 1.53% fold_into @turn_river_game.rs:614 + 1.51% walk @turn_river_game.rs:667 + 1.39% walk @turn_river_game.rs:692 + 1.20% matched @zip.rs:? + 1.12% max @f64.rs:1091 + 1.06% min @cmp.rs:1090 + 1.02% write @mod.rs:1963 + 0.98% non_null @mod.rs:611 + 0.89% offset_from_unsigned @const_ptr.rs:733 + 0.84% lt @cmp.rs:2144 + 0.68% next, core::slice::iter::Iter> @zip.rs:300 + 0.56% increment_len @set_len_on_drop.rs:19 + 0.55% next, core::slice::iter::ChunksMut> @zip.rs:300 + 0.53% {closure#0} @turn_river_game.rs:675 + 0.51% spec_next @range.rs:1100 + 0.51% walk @index.rs:? + +== inclusive == +100.00% zeile +100.00% or_try_insert_with<(usize, usize), alloc::vec::Vec<>, alloc::alloc::Global, std::collections::hash::map::{impl#72}::or_insert_with::{closure_env#0}<(usize, usize), alloc::vec::Vec<>, alloc::alloc::Global, rechner::blueprint::lbr::hand::{closure#0}::{closure_env#0}<>>, !> +100.00% <&dyn core::ops::function::Fn<> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe as core::ops::function::FnOnce<>>::call_once +100.00% std::panicking::catch_unwind:: +100.00% call_once +100.00% std::panic::catch_unwind::<&dyn core::ops::function::Fn<> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe, i32> +100.00% main +100.00% std::panicking::catch_unwind:: + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe> +100.00% ?? +100.00% std::panic::catch_unwind:: +100.00% lbr_hand +100.00% or_insert_with<(usize, usize), alloc::vec::Vec<>, alloc::alloc::Global, rechner::blueprint::lbr::hand::{closure#0}::{closure_env#0}<>> +100.00% std::rt::lang_start_internal +100.00% __rust_begin_short_backtrace +100.00% hand +100.00% {closure#0}<(usize, usize), alloc::vec::Vec<>, alloc::alloc::Global, rechner::blueprint::lbr::hand::{closure#0}::{closure_env#0}<>> +100.00% std::panicking::catch_unwind::do_call:: +100.00% std::panicking::catch_unwind::do_call::<&dyn core::ops::function::Fn<> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe, i32> +100.00% {closure#0} +100.00% std::rt::lang_start_internal::{closure#0} + 99.95% {closure#0} + 99.95% and_then<(rechner::game::spot::Spot, f64), usize, rechner::blueprint::engine_gegner::{impl#2}::zeile_und_entscheidung::{closure_env#0}> + 99.95% zeile_und_entscheidung + 99.95% decide + 99.95% decide_with + 99.95% think + 99.95% postflop + 99.84% flop_spieler_decision + 99.82% solve_flop + 95.65% iterate + 95.63% walk + 42.20% show + 42.14% show_eq + 38.74% collect, rechner::cfr::turn_river_game::{impl#3}::show_eq::{closure_env#1}>, alloc::vec::Vec<>> + 38.74% from_iter, rechner::cfr::turn_river_game::{impl#3}::show_eq::{closure_env#1}>> + 35.37% fold, rechner::cfr::turn_river_game::{impl#3}::show_eq::{closure_env#1}, (), core::iter::traits::iterator::Iterator::for_each::call::{closure_env#0}, rechner::cfr::turn_river_game::{impl#3}::show_eq::{closure_env#1}>>>> + 35.37% extend_trusted, rechner::cfr::turn_river_game::{impl#3}::show_eq::{closure_env#1}>> + 35.37% spec_extend, rechner::cfr::turn_river_game::{impl#3}::show_eq::{closure_env#1}>, alloc::alloc::Global> + 35.37% for_each, rechner::cfr::turn_river_game::{impl#3}::show_eq::{closure_env#1}>, alloc::vec::{impl#22}::extend_trusted::{closure_env#0}, rechner::cfr::turn_river_game::{impl#3}::show_eq::{closure_env#1}>>> + 35.31% fold, (), core::iter::adapters::map::map_fold::{closure_env#0}<&[f32], f64, (), rechner::cfr::turn_river_game::{impl#3}::show_eq::{closure_env#1}, core::iter::traits::iterator::Iterator::for_each::call::{closure_env#0}, rechner::cfr::turn_river_game::{impl#3}::show_eq::{closure_env#1}>>>>> + 34.92% {closure#0}<&[f32], f64, (), rechner::cfr::turn_river_game::{impl#3}::show_eq::{closure_env#1}, core::iter::traits::iterator::Iterator::for_each::call::{closure_env#0}, rechner::cfr::turn_river_game::{impl#3}::show_eq::{closure_env#1}>>>> + 33.79% {closure#1} + 13.69% matched + 9.28% take + 8.90% resize + 8.88% extend_with + 7.34% fold>> + 7.34% sum> + 7.34% sum, f32> + 7.05% grow_amortized + 7.03% finish_grow + 6.98% grow + 6.98% realloc_nonnull + 6.98% grow_impl_runtime + 6.98% grow_impl + 6.89% reserve + 6.88% reserve + 6.88% fold_into + 6.87% do_reserve_and_handle + 6.28% next diff --git a/messung_perf/sprofC4.out.err b/messung_perf/sprofC4.out.err new file mode 100644 index 00000000..50778a25 --- /dev/null +++ b/messung_perf/sprofC4.out.err @@ -0,0 +1,4 @@ +23.12 s, 30 engine calls, 770.829 ms/call +zeit board=3 flop-solver alle: n 30 p50 1307.73 ms p99 1448.59 ms max 1448.59 ms +zeit board=3 flop-solver live: n 1 p50 1333.54 ms p99 1333.54 ms max 1333.54 ms +15167 samples -> sprofC4.txt diff --git a/messung_perf/sprofC4.report.txt b/messung_perf/sprofC4.report.txt new file mode 100644 index 00000000..87202b35 --- /dev/null +++ b/messung_perf/sprofC4.report.txt @@ -0,0 +1,107 @@ +15167 samples + +== self (innermost function) == + 24.22% ?? + 14.21% {closure#2} + 8.86% walk + 6.47% sum> + 5.33% matched + 2.70% eq + 2.55% fold_into + 2.35% next, core::slice::iter::ChunksMut> + 2.35% eq + 2.13% checked_sub + 2.11% add_assign + 2.02% fold>> + 1.81% index + 1.80% next, core::slice::iter::IterMut> + 1.53% index + 1.26% fold, (), core::iter::adapters::map::map_fold::{closure_env#0}<&[f32], f64, (), rechner::cfr::turn_river_game::{impl#3}::show_eq::{closure_env#2}, core::iter::traits::iterator::Iterator::for_each::call::{closure_env#0}, rechner::cfr::turn_river_game::{impl#3}::show_eq::{closure_env#2}>>>>> + 1.26% max + 0.86% lt + 0.80% non_null + 0.78% spec_next + 0.69% increment_len + 0.68% next, core::slice::iter::Iter> + 0.67% {closure#0}, rechner::cfr::turn_river_game::{impl#3}::walk::{closure_env#0}>>> + 0.65% {closure#0} + 0.64% div + +== self by line == + 23.96% ?? @??:0 + 11.12% {closure#2} @turn_river_game.rs:453 + 6.47% sum> @arith.rs:104 + 3.87% matched @turn_river_game.rs:313 + 2.70% eq @non_null.rs:1663 + 2.35% eq @non_null.rs:1663 + 2.13% checked_sub @uint_macros.rs:1092 + 1.91% walk @turn_river_game.rs:688 + 1.89% add_assign @arith.rs:790 + 1.81% fold>> @macros.rs:279 + 1.75% index @index.rs:238 + 1.67% walk @turn_river_game.rs:689 + 1.64% next, core::slice::iter::IterMut> @zip.rs:300 + 1.50% next, core::slice::iter::ChunksMut> @zip.rs:304 + 1.36% index @index.rs:408 + 1.35% fold_into @turn_river_game.rs:624 + 1.28% walk @turn_river_game.rs:702 + 1.28% walk @turn_river_game.rs:677 + 1.26% max @f64.rs:1091 + 1.21% {closure#2} @turn_river_game.rs:461 + 1.07% matched @zip.rs:? + 0.91% fold, (), core::iter::adapters::map::map_fold::{closure_env#0}<&[f32], f64, (), rechner::cfr::turn_river_game::{impl#3}::show_eq::{closure_env#2}, core::iter::traits::iterator::Iterator::for_each::call::{closure_env#0}, rechner::cfr::turn_river_game::{impl#3}::show_eq::{closure_env#2}>>>>> @iterator.rs:? + 0.86% lt @cmp.rs:2144 + 0.80% non_null @mod.rs:611 + 0.78% {closure#2} @turn_river_game.rs:451 + +== inclusive == +100.00% std::panicking::catch_unwind::do_call::<&dyn core::ops::function::Fn<> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe, i32> +100.00% call_once +100.00% std::panic::catch_unwind::<&dyn core::ops::function::Fn<> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe, i32> +100.00% hand +100.00% std::panicking::catch_unwind::do_call:: +100.00% <&dyn core::ops::function::Fn<> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe as core::ops::function::FnOnce<>>::call_once +100.00% std::panic::catch_unwind:: +100.00% std::rt::lang_start_internal::{closure#0} +100.00% std::panicking::catch_unwind:: +100.00% main +100.00% lbr_hand +100.00% std::rt::lang_start_internal +100.00% __rust_begin_short_backtrace +100.00% std::panicking::catch_unwind:: + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe> +100.00% ?? + 99.99% {closure#0} + 99.99% zeile + 99.99% {closure#0}<(usize, usize), alloc::vec::Vec<>, alloc::alloc::Global, rechner::blueprint::lbr::hand::{closure#0}::{closure_env#0}<>> + 99.99% or_try_insert_with<(usize, usize), alloc::vec::Vec<>, alloc::alloc::Global, std::collections::hash::map::{impl#72}::or_insert_with::{closure_env#0}<(usize, usize), alloc::vec::Vec<>, alloc::alloc::Global, rechner::blueprint::lbr::hand::{closure#0}::{closure_env#0}<>>, !> + 99.99% or_insert_with<(usize, usize), alloc::vec::Vec<>, alloc::alloc::Global, rechner::blueprint::lbr::hand::{closure#0}::{closure_env#0}<>> + 99.90% zeile_und_entscheidung + 99.89% postflop + 99.89% and_then<(rechner::game::spot::Spot, f64), usize, rechner::blueprint::engine_gegner::{impl#2}::zeile_und_entscheidung::{closure_env#0}> + 99.89% decide + 99.89% decide_with + 99.89% think + 99.89% {closure#0} + 99.82% flop_spieler_decision + 99.80% solve_flop + 94.86% iterate + 94.84% walk + 42.12% show + 42.02% show_eq + 33.94% from_iter, rechner::cfr::turn_river_game::{impl#3}::show_eq::{closure_env#2}>> + 33.94% collect, rechner::cfr::turn_river_game::{impl#3}::show_eq::{closure_env#2}>, alloc::vec::Vec<>> + 30.53% spec_extend, rechner::cfr::turn_river_game::{impl#3}::show_eq::{closure_env#2}>, alloc::alloc::Global> + 30.53% extend_trusted, rechner::cfr::turn_river_game::{impl#3}::show_eq::{closure_env#2}>> + 30.53% for_each, rechner::cfr::turn_river_game::{impl#3}::show_eq::{closure_env#2}>, alloc::vec::{impl#22}::extend_trusted::{closure_env#0}, rechner::cfr::turn_river_game::{impl#3}::show_eq::{closure_env#2}>>> + 30.53% fold, rechner::cfr::turn_river_game::{impl#3}::show_eq::{closure_env#2}, (), core::iter::traits::iterator::Iterator::for_each::call::{closure_env#0}, rechner::cfr::turn_river_game::{impl#3}::show_eq::{closure_env#2}>>>> + 30.46% fold, (), core::iter::adapters::map::map_fold::{closure_env#0}<&[f32], f64, (), rechner::cfr::turn_river_game::{impl#3}::show_eq::{closure_env#2}, core::iter::traits::iterator::Iterator::for_each::call::{closure_env#0}, rechner::cfr::turn_river_game::{impl#3}::show_eq::{closure_env#2}>>>>> + 29.11% {closure#0}<&[f32], f64, (), rechner::cfr::turn_river_game::{impl#3}::show_eq::{closure_env#2}, core::iter::traits::iterator::Iterator::for_each::call::{closure_env#0}, rechner::cfr::turn_river_game::{impl#3}::show_eq::{closure_env#2}>>>> + 28.48% {closure#2} + 13.18% matched + 10.84% take + 10.03% grow_amortized + 10.02% reserve + 9.92% finish_grow + 9.86% do_reserve_and_handle + 9.84% grow + 9.84% realloc_nonnull diff --git a/messung_perf/sprofC5.out.err b/messung_perf/sprofC5.out.err new file mode 100644 index 00000000..2ef01d3c --- /dev/null +++ b/messung_perf/sprofC5.out.err @@ -0,0 +1,4 @@ +15.42 s, 30 engine calls, 513.933 ms/call +zeit board=3 flop-solver alle: n 30 p50 849.74 ms p99 1037.95 ms max 1037.95 ms +zeit board=3 flop-solver live: n 1 p50 898.11 ms p99 898.11 ms max 898.11 ms +10098 samples -> sprofC5.txt diff --git a/messung_perf/sprofC5.report.txt b/messung_perf/sprofC5.report.txt new file mode 100644 index 00000000..cd0b471f --- /dev/null +++ b/messung_perf/sprofC5.report.txt @@ -0,0 +1,107 @@ +10098 samples + +== self (innermost function) == + 21.40% show_eq_into + 11.89% walk + 9.69% next + 6.34% matched + 6.10% split_at_checked + 4.28% ?? + 3.44% next, core::slice::iter::ChunksMut> + 3.21% fold_into + 2.97% eq + 2.84% add_assign + 2.83% fold>> + 2.41% next, core::slice::iter::IterMut> + 1.88% index + 1.75% non_null + 1.61% max + 1.53% {closure#0} + 1.20% lt + 1.12% spec_next + 0.84% next, core::slice::iter::IterMut> + 0.83% div + 0.70% drop + 0.67% add + 0.66% as_mut_slice + 0.63% clone + 0.62% non_null> + +== self by line == + 16.73% show_eq_into @turn_river_game.rs:458 + 9.69% next @iter.rs:1895 + 6.02% split_at_checked @mod.rs:2163 + 4.19% matched @turn_river_game.rs:315 + 4.10% ?? @??:0 + 3.97% show_eq_into @turn_river_game.rs:465 + 2.97% eq @non_null.rs:1663 + 2.76% walk @turn_river_game.rs:706 + 2.64% add_assign @arith.rs:790 + 2.53% fold>> @macros.rs:279 + 2.37% next, core::slice::iter::ChunksMut> @zip.rs:304 + 2.30% next, core::slice::iter::IterMut> @zip.rs:300 + 2.02% walk @turn_river_game.rs:707 + 1.96% walk @turn_river_game.rs:695 + 1.88% fold_into @turn_river_game.rs:632 + 1.82% index @index.rs:238 + 1.80% walk @turn_river_game.rs:720 + 1.75% non_null @mod.rs:611 + 1.74% matched @zip.rs:? + 1.61% max @f64.rs:1091 + 1.20% lt @cmp.rs:2144 + 1.11% spec_next @range.rs:1100 + 0.96% next, core::slice::iter::ChunksMut> @zip.rs:300 + 0.82% {closure#0} @turn_river_game.rs:703 + 0.70% drop @sync.rs:2868 + +== inclusive == +100.00% lbr_hand +100.00% std::rt::lang_start_internal::{closure#0} +100.00% zeile +100.00% std::panicking::catch_unwind:: + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe> +100.00% std::panicking::catch_unwind:: +100.00% {closure#0}<(usize, usize), alloc::vec::Vec<>, alloc::alloc::Global, rechner::blueprint::lbr::hand::{closure#0}::{closure_env#0}<>> +100.00% std::panic::catch_unwind:: +100.00% call_once +100.00% std::panic::catch_unwind::<&dyn core::ops::function::Fn<> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe, i32> +100.00% __rust_begin_short_backtrace +100.00% std::panicking::catch_unwind::do_call::<&dyn core::ops::function::Fn<> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe, i32> +100.00% or_insert_with<(usize, usize), alloc::vec::Vec<>, alloc::alloc::Global, rechner::blueprint::lbr::hand::{closure#0}::{closure_env#0}<>> +100.00% {closure#0} +100.00% std::rt::lang_start_internal +100.00% <&dyn core::ops::function::Fn<> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe as core::ops::function::FnOnce<>>::call_once +100.00% or_try_insert_with<(usize, usize), alloc::vec::Vec<>, alloc::alloc::Global, std::collections::hash::map::{impl#72}::or_insert_with::{closure_env#0}<(usize, usize), alloc::vec::Vec<>, alloc::alloc::Global, rechner::blueprint::lbr::hand::{closure#0}::{closure_env#0}<>>, !> +100.00% std::panicking::catch_unwind::do_call:: +100.00% hand +100.00% main +100.00% ?? + 99.86% and_then<(rechner::game::spot::Spot, f64), usize, rechner::blueprint::engine_gegner::{impl#2}::zeile_und_entscheidung::{closure_env#0}> + 99.86% decide + 99.86% postflop + 99.86% decide_with + 99.86% zeile_und_entscheidung + 99.86% think + 99.86% {closure#0} + 99.73% flop_spieler_decision + 99.67% solve_flop + 98.59% iterate + 98.58% walk + 39.72% show_eq_into + 17.38% matched + 15.80% next<&mut core::slice::iter::ChunksExact, &mut core::slice::iter::ChunksExact> + 15.80% next + 15.80% next> + 8.64% fold_into + 6.10% split_at_checked + 4.06% index + 3.95% sum> + 3.95% sum, f64> + 3.95% fold>> + 3.91% fold, f64, core::iter::adapters::map::map_fold::{closure_env#0}, rechner::cfr::turn_river_game::{impl#3}::walk::{closure_env#0}>>>> + 3.91% sum, rechner::cfr::turn_river_game::{impl#3}::walk::{closure_env#0}>> + 3.91% fold, rechner::cfr::turn_river_game::{impl#3}::walk::{closure_env#0}, f64, core::iter::traits::accum::{impl#132}::sum::{closure_env#0}, rechner::cfr::turn_river_game::{impl#3}::walk::{closure_env#0}>>> + 3.91% sum, rechner::cfr::turn_river_game::{impl#3}::walk::{closure_env#0}>, f64> + 3.44% next, core::slice::iter::ChunksMut> + 2.97% eq + 2.84% {closure#0}, rechner::cfr::turn_river_game::{impl#3}::walk::{closure_env#0}>>> + 2.84% add_assign diff --git a/messung_perf/test.err b/messung_perf/test.err new file mode 100644 index 00000000..6f4d6c91 --- /dev/null +++ b/messung_perf/test.err @@ -0,0 +1,159 @@ + Compiling rechner v0.1.0 (D:\Projects\pokerfreak\.claude\worktrees\perf-hardcore-bb2b45) + Finished `release` profile [optimized] target(s) in 48.20s + Running unittests src\lib.rs (target\release\deps\rechner-cb83cefb6e0b1925.exe) + Running unittests src\bin\ab_zelle.rs (target\release\deps\ab_zelle-f22e7067e207f67c.exe) + Running unittests src\bin\abstraktion.rs (target\release\deps\abstraktion-60e34316b8dc3014.exe) + Running unittests src\bin\adaptive_gap.rs (target\release\deps\adaptive_gap-3105b2eea0b6cafb.exe) + Running unittests src\bin\aivat_bench.rs (target\release\deps\aivat_bench-5ec1663aab7a45b0.exe) + Running unittests src\bin\arch_read.rs (target\release\deps\arch_read-462d2d02e739f5a0.exe) + Running unittests src\bin\audit.rs (target\release\deps\audit-47cbae840256169b.exe) + Running unittests src\bin\benchmark.rs (target\release\deps\benchmark-e4bd7550cbf2ad70.exe) + Running unittests src\bin\benchmark_plo5.rs (target\release\deps\benchmark_plo5-91f95706e510a6cd.exe) + Running unittests src\bin\chartgen.rs (target\release\deps\chartgen-863f24d20c300095.exe) + Running unittests src\bin\diag_gto.rs (target\release\deps\diag_gto-79a11f124619a673.exe) + Running unittests src\bin\diag_nemesis.rs (target\release\deps\diag_nemesis-f3298f3f193612b7.exe) + Running unittests src\bin\engine_lbr.rs (target\release\deps\engine_lbr-cc01d4d090c3c83a.exe) + Running unittests src\bin\exploit_gap.rs (target\release\deps\exploit_gap-cbf36329b8279ea8.exe) + Running unittests src\bin\exploit_scan.rs (target\release\deps\exploit_scan-ae2d45484ec2d0bb.exe) + Running unittests src\bin\floor_read.rs (target\release\deps\floor_read-0e97461aa93d6ffe.exe) + Running unittests src\bin\glueck_sim.rs (target\release\deps\glueck_sim-b92d610b2547b261.exe) + Running unittests src\bin\grundstrategie.rs (target\release\deps\grundstrategie-98eab348244f24a3.exe) + Running unittests src\bin\grundtextur.rs (target\release\deps\grundtextur-fbe38b6fa0decc57.exe) + Running unittests src\bin\gto_read_probe.rs (target\release\deps\gto_read_probe-742c970ca7d31f94.exe) + Running unittests src\bin\league.rs (target\release\deps\league-ea52e6524ecc743f.exe) + Running unittests src\bin\nemesis.rs (target\release\deps\nemesis-14635cc5eb046851.exe) + Running unittests src\bin\nemesis_read.rs (target\release\deps\nemesis_read-745b74735d06d93c.exe) + Running unittests src\bin\perf_probe\main.rs (target\release\deps\perf_probe-e1bfd1c37da0ef08.exe) + Running unittests src\bin\plateau.rs (target\release\deps\plateau-92d1f1877e083c5e.exe) + Running unittests src\bin\plateau_flop.rs (target\release\deps\plateau_flop-5602a739bfee4b2e.exe) + Running unittests src\bin\plo5_calibrate.rs (target\release\deps\plo5_calibrate-1a457bf35f22a3ec.exe) + Running unittests src\bin\read_diff.rs (target\release\deps\read_diff-bd2cd56d8ef25b7b.exe) + Running unittests src\main.rs (target\release\deps\rechner-0b8b6fcf934d2309.exe) + Running unittests src\bin\simreal.rs (target\release\deps\simreal-ac2712965894ec4d.exe) + Running unittests src\bin\turnier_leiter.rs (target\release\deps\turnier_leiter-35b5fd41c54f78be.exe) + Running unittests src\bin\twin_gate.rs (target\release\deps\twin_gate-335e1ea1c769a77d.exe) + Running unittests src\bin\welt_leiter.rs (target\release\deps\welt_leiter-724d892061f4c303.exe) + Running tests\bluff_catch_price.rs (target\release\deps\bluff_catch_price-371658bec4d57b6a.exe) + Running tests\bluff_fold_chance.rs (target\release\deps\bluff_fold_chance-d58adc0886a935ed.exe) + Running tests\bluff_property.rs (target\release\deps\bluff_property-c43a50e168405df7.exe) + Running tests\bluff_range.rs (target\release\deps\bluff_range-c7689b3f4cf30c21.exe) + Running tests\bluff_share.rs (target\release\deps\bluff_share-91c4cc1109f50218.exe) + Running tests\called_range_share.rs (target\release\deps\called_range_share-28db8b2eb4c361ad.exe) + Running tests\card_basics.rs (target\release\deps\card_basics-5e4d3f9b74b2b9ca.exe) + Running tests\cfr_equity.rs (target\release\deps\cfr_equity-0cf07315e2b7123a.exe) + Running tests\cfr_games.rs (target\release\deps\cfr_games-8f32ad1058ba2173.exe) + Running tests\cfr_hand_class.rs (target\release\deps\cfr_hand_class-b45497b3f47bc5bd.exe) + Running tests\cfr_kuhn.rs (target\release\deps\cfr_kuhn-1a1fc3100d0dedae.exe) + Running tests\cfr_multi.rs (target\release\deps\cfr_multi-d32413eb561b5e52.exe) +error: test failed, to rerun pass `--test cfr_multi` + Running tests\cfr_nash.rs (target\release\deps\cfr_nash-1400882d77397768.exe) + Running tests\cfr_rake.rs (target\release\deps\cfr_rake-4d2594b7d69e623d.exe) + Running tests\cfr_three_way.rs (target\release\deps\cfr_three_way-3611e30b033d287e.exe) + Running tests\double_board_split.rs (target\release\deps\double_board_split-fe2d3a316baaff65.exe) + Running tests\engine_choose_postflop.rs (target\release\deps\engine_choose_postflop-5bec11b8c8bfe7fe.exe) + Running tests\engine_from_plan.rs (target\release\deps\engine_from_plan-3c0db3324429e0db.exe) + Running tests\engine_multiway.rs (target\release\deps\engine_multiway-7cadc2f14c4cc631.exe) + Running tests\engine_property.rs (target\release\deps\engine_property-9108357945dda211.exe) + Running tests\engine_range_filter.rs (target\release\deps\engine_range_filter-9a3dd1a6950bdfd2.exe) + Running tests\engine_read_gate.rs (target\release\deps\engine_read_gate-4f30f282bcadde5e.exe) + Running tests\engine_read_label.rs (target\release\deps\engine_read_label-3002296259b02155.exe) + Running tests\engine_semibluff.rs (target\release\deps\engine_semibluff-24e183bc4ba38393.exe) + Running tests\engine_size_policy.rs (target\release\deps\engine_size_policy-ebd64e9b1c0784fe.exe) + Running tests\engine_texture_stance.rs (target\release\deps\engine_texture_stance-4021f81a1929c0b1.exe) + Running tests\engine_thin_value.rs (target\release\deps\engine_thin_value-633edfbcfef784d6.exe) + Running tests\engine_uncertainty.rs (target\release\deps\engine_uncertainty-5752062b0dd9fe04.exe) + Running tests\equity_faults.rs (target\release\deps\equity_faults-9c1da35ac363e04f.exe) + Running tests\equity_properties.rs (target\release\deps\equity_properties-33f3eb8bdd6dd68b.exe) + Running tests\equity_reference.rs (target\release\deps\equity_reference-63c734b43120cae2.exe) + Running tests\exploit_adjust.rs (target\release\deps\exploit_adjust-a889b8dd178913aa.exe) + Running tests\exploit_range_guess.rs (target\release\deps\exploit_range_guess-805f6bc3438f43ad.exe) + Running tests\exploit_sample.rs (target\release\deps\exploit_sample-dfe10632d083b555.exe) + Running tests\exploit_style.rs (target\release\deps\exploit_style-f4b4b26f676699b1.exe) + Running tests\generated_charts_lookup.rs (target\release\deps\generated_charts_lookup-56f04c7fc8d25c6c.exe) + Running tests\generated_charts_plausibility.rs (target\release\deps\generated_charts_plausibility-191284db112d1a58.exe) +error: test failed, to rerun pass `--test generated_charts_plausibility` + Running tests\generated_charts_reproduce.rs (target\release\deps\generated_charts_reproduce-1e39066d7757592b.exe) +error: test failed, to rerun pass `--test generated_charts_reproduce` + Running tests\guard_enforce.rs (target\release\deps\guard_enforce-1a4a7786890a29d7.exe) + Running tests\guard_settle.rs (target\release\deps\guard_settle-081632689a4e1e38.exe) + Running tests\guard_validate.rs (target\release\deps\guard_validate-fa776bd53ee1a837.exe) + Running tests\hand_five_cards.rs (target\release\deps\hand_five_cards-3430623fa0052a9e.exe) + Running tests\hand_showdown.rs (target\release\deps\hand_showdown-f0f955106ff42dcb.exe) + Running tests\history_decode.rs (target\release\deps\history_decode-3cb42ffc2b137059.exe) + Running tests\icm_bubble.rs (target\release\deps\icm_bubble-6706759f8ef45610.exe) + Running tests\json_field.rs (target\release\deps\json_field-5b09e6b9b518ad0f.exe) + Running tests\json_parse.rs (target\release\deps\json_parse-eef053f7527cb002.exe) + Running tests\json_render.rs (target\release\deps\json_render-5354bfb16ac363c4.exe) + Running tests\line_reads.rs (target\release\deps\line_reads-9906717f118f6126.exe) + Running tests\odds_break_even.rs (target\release\deps\odds_break_even-7095b45a4031f25c.exe) + Running tests\odds_ev.rs (target\release\deps\odds_ev-97bf0c624e2863f3.exe) + Running tests\pipeline_bluff.rs (target\release\deps\pipeline_bluff-d65263840390028b.exe) +error: test failed, to rerun pass `--test pipeline_bluff` + Running tests\pipeline_contract.rs (target\release\deps\pipeline_contract-9bc6bd0ac10eb375.exe) + Running tests\pipeline_double_board.rs (target\release\deps\pipeline_double_board-d38d54e7e9c32405.exe) + Running tests\pipeline_extras_neutral.rs (target\release\deps\pipeline_extras_neutral-5ebcd8969f4ea338.exe) + Running tests\pipeline_mark.rs (target\release\deps\pipeline_mark-0c0d48119f4b6a67.exe) + Running tests\pipeline_plo4.rs (target\release\deps\pipeline_plo4-4d2cbce8fa3d7098.exe) + Running tests\pipeline_plo5.rs (target\release\deps\pipeline_plo5-f55d84e074f1cb59.exe) + Running tests\pipeline_postflop_v2.rs (target\release\deps\pipeline_postflop_v2-25f8224141c1f368.exe) + Running tests\pipeline_property.rs (target\release\deps\pipeline_property-4633c29555bdea46.exe) + Running tests\pipeline_run_twice.rs (target\release\deps\pipeline_run_twice-a07ce69cb93224b8.exe) + Running tests\pipeline_tournament.rs (target\release\deps\pipeline_tournament-d9e7e3578dca243c.exe) + Running tests\plo6.rs (target\release\deps\plo6-59cb09007fd25fd4.exe) + Running tests\position_advise.rs (target\release\deps\position_advise-d45be657b21f6279.exe) + Running tests\position_button.rs (target\release\deps\position_button-e37bcf6e0058bfa0.exe) + Running tests\position_exhaustive.rs (target\release\deps\position_exhaustive-302bf5d09d1f2244.exe) + Running tests\preflop_advise.rs (target\release\deps\preflop_advise-40d0efec56546807.exe) + Running tests\preflop_ante_situation.rs (target\release\deps\preflop_ante_situation-26073b4c8aea5c99.exe) + Running tests\preflop_cfr_advice.rs (target\release\deps\preflop_cfr_advice-6655037a88b77ba7.exe) + Running tests\preflop_commit_guard.rs (target\release\deps\preflop_commit_guard-3e5ec149a4c93eb8.exe) + Running tests\preflop_multi_advice.rs (target\release\deps\preflop_multi_advice-1bb15b170d765e96.exe) +error: test failed, to rerun pass `--test preflop_multi_advice` + Running tests\preflop_percentile.rs (target\release\deps\preflop_percentile-9cc82006162e28c3.exe) + Running tests\preflop_plo4.rs (target\release\deps\preflop_plo4-ce3a09cf0598465d.exe) +error: test failed, to rerun pass `--test preflop_plo4` + Running tests\preflop_plo5.rs (target\release\deps\preflop_plo5-7e4ef36685d43b00.exe) + Running tests\preflop_position.rs (target\release\deps\preflop_position-6af4bc1f0749ba0b.exe) + Running tests\preflop_sb_vs_limp.rs (target\release\deps\preflop_sb_vs_limp-8a8c56926cfc05ce.exe) + Running tests\preflop_situation.rs (target\release\deps\preflop_situation-a9fc532c30dfa4ef.exe) + Running tests\preflop_situation_history.rs (target\release\deps\preflop_situation_history-75d9a0c26a7f4886.exe) + Running tests\rake_rule.rs (target\release\deps\rake_rule-288421bc1547dfb1.exe) + Running tests\range_model_postflop.rs (target\release\deps\range_model_postflop-7261f0e61f18c566.exe) + Running tests\range_model_preflop.rs (target\release\deps\range_model_preflop-0d3d6fc88c64f36b.exe) + Running tests\range_model_profile.rs (target\release\deps\range_model_profile-c0f2bb56a9c7969a.exe) + Running tests\range_model_robust.rs (target\release\deps\range_model_robust-6efe1d43d43f5d99.exe) + Running tests\read_draw.rs (target\release\deps\read_draw-0fa67e2d280422bc.exe) + Running tests\read_faults.rs (target\release\deps\read_faults-30bfa712acec3fba.exe) + Running tests\read_glance.rs (target\release\deps\read_glance-0f0759ff9052d3d0.exe) + Running tests\read_made.rs (target\release\deps\read_made-4ec90ae95dc2d617.exe) + Running tests\read_nut_made.rs (target\release\deps\read_nut_made-1113a81400cc40b0.exe) + Running tests\read_outs.rs (target\release\deps\read_outs-5ab00f8de3340c18.exe) + Running tests\read_texture.rs (target\release\deps\read_texture-f05ef43b0bb3c34b.exe) + Running tests\short_deck_charts.rs (target\release\deps\short_deck_charts-712f2a3bc542866e.exe) + Running tests\short_deck_deck.rs (target\release\deps\short_deck_deck-2a52e364e1f05fd4.exe) + Running tests\short_deck_equity.rs (target\release\deps\short_deck_equity-408ef15b264cfaff.exe) + Running tests\short_deck_frequencies.rs (target\release\deps\short_deck_frequencies-be482edfb1ac26a9.exe) + Running tests\short_deck_guard.rs (target\release\deps\short_deck_guard-f35fcf58cfe423f0.exe) + Running tests\short_deck_percentile.rs (target\release\deps\short_deck_percentile-fe2bc59036cf2cf4.exe) + Running tests\short_deck_ranking.rs (target\release\deps\short_deck_ranking-c88160990f2a1a05.exe) + Running tests\short_deck_ranking_generate.rs (target\release\deps\short_deck_ranking_generate-8dd91215e23a21d8.exe) + Running tests\short_deck_sizing.rs (target\release\deps\short_deck_sizing-d05912c34afa3085.exe) + Running tests\sim_benchmark.rs (target\release\deps\sim_benchmark-d5568d24dc0bbc19.exe) + Running tests\sim_blind.rs (target\release\deps\sim_blind-d4a6bba04122c95c.exe) + Running tests\sim_opponent_stats.rs (target\release\deps\sim_opponent_stats-a7f20f2fd8844642.exe) + Running tests\sim_reads.rs (target\release\deps\sim_reads-58937d134efb0f7f.exe) + Running tests\sim_strength.rs (target\release\deps\sim_strength-a34947bae9fca1ea.exe) + Running tests\sizing_candidates.rs (target\release\deps\sizing_candidates-a35ae4fc07706a92.exe) + Running tests\sizing_preflop.rs (target\release\deps\sizing_preflop-7ea6cc3d8ddb4a6b.exe) + Running tests\wire_action_evs.rs (target\release\deps\wire_action_evs-a82577d1f626c4d0.exe) + Running tests\wire_decode.rs (target\release\deps\wire_decode-757154c3f63e43c8.exe) + Running tests\wire_encode.rs (target\release\deps\wire_encode-10443af3c60a0283.exe) + Running tests\wire_respond.rs (target\release\deps\wire_respond-ceba7dd298460f0b.exe) + Doc-tests rechner +error: 6 targets failed: + `--test cfr_multi` + `--test generated_charts_plausibility` + `--test generated_charts_reproduce` + `--test pipeline_bluff` + `--test preflop_multi_advice` + `--test preflop_plo4` diff --git a/messung_perf/test.out b/messung_perf/test.out new file mode 100644 index 00000000..68116db5 --- /dev/null +++ b/messung_perf/test.out @@ -0,0 +1,2095 @@ + +running 226 tests +test blueprint::abstraktion::tests::combo_index_is_the_position_in_combos ... ok +test blueprint::abstraktion::tests::river_ehs_matches_brute_force ... ok +test blueprint::abstraktion::tests::river_classes_are_monotone_and_fill_the_range ... ok +test blueprint::abstraktion::tests::turn_histograms_put_locked_hands_at_the_ends ... ok +test blueprint::iso::tests::a_suit_renaming_keeps_the_index ... ok +test blueprint::iso::tests::flop_has_the_known_number_of_canonical_deals ... ok +test blueprint::iso::tests::turn_has_the_known_number_of_canonical_deals ... ok +test blueprint::lbr::tests::bias_on_the_real_blueprint ... ignored +test blueprint::engine_gegner::tests::the_engine_answers_on_s1_nodes_and_lbr_runs_against_it ... ok +test blueprint::lbr::tests::lbr_punishes_a_uniform_strategy_more_than_a_trained_one ... ok +test blueprint::mccfr::tests::checkpoints_round_trip ... ok +test blueprint::lbr::tests::subsampled_lbr_agrees_with_the_exact_one ... ok +test blueprint::mccfr::tests::resumed_run_equals_uninterrupted_run ... ok +test blueprint::ranges::echt::real_blueprint_ranges_for_an_s1_river ... ignored, needs GRUNDSTRATEGIE with tables and a checkpoint +test blueprint::ranges::tests::an_s1_line_gives_ranges_at_the_heros_river_node ... ok +test blueprint::ranges::tests::every_scenario_is_recognised_and_gives_ranges ... ok +test blueprint::ranges::tests::lines_outside_the_scenarios_give_none ... ok +test blueprint::ranges::tests::pseudo_harmonic_mapping ... ok +test blueprint::ranges::tests::scenario_ranges_follow_the_charts ... ok +test blueprint::s1::tests::every_scenario_tree_is_well_formed_and_zero_sum ... ok +test blueprint::mccfr::tests::mccfr_solves_the_river_game_like_cfr_plus ... ok +test blueprint::s1::tests::lbr_falls_btn3 ... ok +test blueprint::s1::tests::lbr_falls_co ... ok +test blueprint::s1::tests::lbr_falls_co3 ... ok +test blueprint::s1::tests::lbr_falls_s1 ... ok +test blueprint::s1::tests::s1_runs_and_stays_zero_sum ... ok +test blueprint::s1::tests::s1_through_the_family_is_unchanged ... ok +test blueprint::s1::tests::the_preflop_ranges_are_the_engine_charts ... ok +test blueprint::s1::tests::the_s1_tree_is_well_formed ... ok +test blueprint::s1::tests::lbr_falls_sb ... ok +test blueprint::textur::tests::group_counts_are_sane ... ok +test blueprint::textur::tests::refined_classes_stay_inside_the_street_space ... ok +test blueprint::textur::tests::suit_renaming_keeps_the_group_and_textures_differ ... ok +test cfr::dbr::tests::it_value_bets_thin_where_the_equilibrium_never_bets ... ok +test cfr::dbr::tests::the_counter_strategy_trades_worst_case_for_value_against_the_model ... ok +test cfr::dbr::tests::zero_weight_is_nash ... ok +test cfr::kl_br::tests::lambda_sweep_traces_safety_exploit_tradeoff ... ok +test cfr::plo5_bucket::tests::abstraction_discriminates ... ok +test cfr::plo5_bucket::tests::band_edges_are_off_by_one_safe ... ok +test cfr::plo5_bucket::tests::band_merges_similar_strength ... ok +test cfr::plo5_bucket::tests::bucket_new_validates ... ok +test cfr::plo5_bucket::tests::clamps_out_of_range_percentile ... ok +test cfr::plo5_bucket::tests::default_count_is_manageable ... ok +test cfr::plo5_bucket::tests::monotone_in_percentile ... ok +test cfr::plo5_bucket::tests::order_independent_for_permuted_hole ... ok +test cfr::plo5_bucket::tests::percentile_one_maps_to_weakest_bucket ... ok +test cfr::plo5_bucket::tests::percentile_zero_maps_to_strongest_bucket ... ok +test cfr::plo5_bucket::tests::premium_hand_buckets_below_trash ... ok +test cfr::plo5_bucket::tests::rejects_non_five_card_hands ... ok +test cfr::plo5_bucket::tests::suit_relabel_keeps_bucket ... ok +test cfr::plo5_bucket::tests::valid_hands_stay_in_range ... ok +test cfr::plo5_bucket::tests::zero_count_is_treated_as_single_bucket ... ok +test cfr::qre::tests::fit_recovers_temperature ... ok +test cfr::qre::tests::qre_interpolates_between_uniform_and_nash ... ok +test cfr::qre::tests::qre_is_a_fixed_point_and_deterministic ... ok +test cfr::river::tests::polarised_river_matches_textbook_gto ... ok +test cfr::river::tests::smaller_bet_shifts_frequencies_as_theory_says ... ok +test cfr::river_game::tests::an_observed_bet_size_is_in_the_tree_and_hero_faces_it ... ok +test cfr::river_game::tests::in_position_a_check_behind_ends_the_street ... ok +test cfr::river_game::tests::one_size_hero_first_is_the_textbook_tree ... ok +test cfr::river_game::tests::the_richer_game_solves_to_low_exploitability ... ok +test cfr::turn::tests::best_response_checks_air_on_the_river ... ok +test cfr::turn::tests::best_response_value_bets_the_nuts ... ok +test cfr::turn::tests::global_fold_stat_books_phantom_barrel_profit ... ok +test cfr::turn::tests::narrowing_keeps_the_strong_tail ... ok +test cfr::turn_river::tests::pair_values_reads_back_the_forced_leaf ... ok +test cfr::turn_river::tests::pair_values_weighted_by_chance_equals_root_values ... ok +test cfr::turn_river::tests::showdown_leaf_reproduces_the_river_tree_exactly ... ok +test cfr::turn_river_game::tests::a_checked_through_turn_is_exactly_the_river_game ... ok +test cfr::turn_river_game::tests::an_observed_turn_bet_is_a_node_and_hero_faces_it ... ok +test cfr::turn_river_game::tests::convergence_probe ... ignored, timing probe +test blueprint::s1::tests::the_textured_game_is_consistent ... ok +test cfr::turn_river_game::tests::the_solver_converges_on_a_real_sized_game ... ok +test cfr::turn_river_game::tests::the_vector_values_equal_the_scalar_enumeration_and_the_game_is_zero_sum ... ok +test cfr::turn_river_game::tests::timing_probe ... ignored, timing probe +test engine::audit::tests::a_set_facing_a_pot_bet_loses_by_folding_not_by_calling ... ok +test engine::audit::tests::air_calling_a_never_bluffing_pot_bet_loses_the_bet ... ok +test engine::audit::tests::checking_the_nuts_first_loses_to_a_bet_and_the_size_is_priced_exactly ... ok +test engine::audit::tests::the_nuts_facing_a_bet_never_lose_by_continuing ... ok +test engine::audit::tests::turn_and_multiway_are_skipped_not_guessed ... ok +test engine::omaha_combos::tests::beaten_overpair_loses_equity_against_a_tight_value_range ... ok +test engine::omaha_combos::tests::every_sampled_hand_satisfies_the_range_and_avoids_dead_cards ... ok +test engine::omaha_combos::tests::impossible_range_yields_no_combos ... ok +test engine::omaha_combos::tests::sampling_is_deterministic ... ok +test engine::postflop::size_mix_tests::mix_is_a_no_op_without_a_tie ... ok +test engine::postflop::size_mix_tests::mix_never_touches_a_non_raise_winner ... ok +test engine::postflop::size_mix_tests::mix_only_swaps_between_ev_tied_sizes ... ok +test engine::postflop::size_mix_tests::zero_error_is_deterministic ... ok +test engine::river_subgame::tests::a_believed_aggressive_villain_bluffs_more_when_checked_to ... ok +test engine::river_subgame::tests::a_believed_station_calls_wider_than_a_believed_overfolder ... ok +test engine::river_subgame::tests::a_confident_station_read_value_bets_a_strong_hand ... ok +test engine::river_subgame::tests::a_confident_underbluff_read_folds_a_bluff_catcher_facing_a_bet ... ok +test engine::river_subgame::tests::a_made_hand_to_act_gets_a_river_mix_that_leans_to_bet ... ok +test engine::river_subgame::tests::dbr_stays_out_on_a_thin_read ... ok +test engine::river_subgame::tests::dbr_value_bets_a_middle_pair_into_a_confident_station ... ok +test engine::river_subgame::tests::lambda_falls_as_confidence_rises_and_is_infinite_without_a_read ... ok +test engine::river_subgame::tests::shown_river_bets_move_the_bluff_belief ... ok +test engine::river_subgame::tests::the_full_river_game_decides_a_heads_up_river ... ok +test engine::river_subgame::tests::the_gearbox_stands_down_below_the_confidence_floor ... ok +test engine::river_subgame::tests::the_veto_leaves_a_non_call_decision_untouched ... ok +test engine::river_subgame::tests::the_veto_needs_an_aggression_read ... ok +test engine::turn_game::tests::a_spot_outside_the_game_is_left_to_the_heuristic ... ok +test engine::turn_game::tests::off_means_none_and_the_engine_is_unchanged ... ok +test engine::turn_game::tests::out_of_position_hero_acts_first_with_check_or_a_bet ... ok +test engine::turn_game::tests::solve_time_at_table_size ... ignored, timing probe +test engine::turn_game::tests::strong_hands_do_not_fold_and_air_folds_more ... ok +test engine::turn_game::tests::the_decision_is_a_legal_choice_at_both_kinds_of_node ... ok +test engine::turn_game::tests::the_public_key_ignores_hero_cards_but_not_the_line ... ok +test engine::turn_game::tests::the_solve_is_deterministic_and_the_game_is_balanced_enough ... ok +test engine::turn_game::tests::tree_sizes ... ignored, timing probe +test engine::turn_subgame::tests::a_confident_station_read_value_bets_a_strong_turn_hand ... ok +test engine::turn_subgame::tests::a_made_hand_to_act_gets_a_turn_mix_that_leans_to_bet ... ok +test engine::turn_subgame::tests::the_slice_declines_off_the_turn ... ok +test engine::turn_subgame::tests::the_turn_gearbox_stands_down_below_the_confidence_floor ... ok +test engine::turn_subgame::tests::the_turn_veto_leaves_a_non_call_decision_untouched ... ok +test exploit::geeicht::tests::schalter_aus_liefert_nichts ... ok +test exploit::geeicht::tests::werte_sind_gueltig ... ok +test exploit::maxent::tests::mittelwert_und_entropiemaximum ... ok +test exploit::maxent::tests::neigung_monoton ... ok +test exploit::maxent::tests::ohne_bedingung_uniform ... ok +test exploit::maxent::tests::rand_und_deterministisch ... ok +test exploit::maxent::tests::zwei_bedingungen ... ok +test exploit::mdf_floor::tests::a_balanced_regular_is_not_floored ... ok +test exploit::mdf_floor::tests::a_confirmed_under_bluffer_is_not_floored ... ok +test exploit::mdf_floor::tests::a_folded_under_bluffer_does_not_suppress_the_live_bettor ... ok +test exploit::mdf_floor::tests::a_loose_aggressive_bettor_is_still_floored ... ok +test exploit::mdf_floor::tests::a_profile_without_an_aggression_read_is_defended_like_an_unread_one ... ok +test exploit::mdf_floor::tests::a_wide_but_balanced_headsup_opponent_is_not_floored ... ok +test exploit::mdf_floor::tests::air_is_never_floored ... ok +test exploit::mdf_floor::tests::an_aggressive_bettor_is_defended ... ok +test exploit::mdf_floor::tests::an_unread_bettor_is_defended ... ok +test exploit::mdf_floor::tests::no_floor_without_a_bet ... ok +test exploit::mdf_floor::tests::only_on_the_river ... ok +test exploit::mdf_floor::tests::top_pair_defends_a_half_pot_river_bet ... ok +test exploit::mdf_floor::tests::weak_pair_folds_to_an_overbet ... ok +test exploit::posterior::tests::konvergiert_gegen_wahren_wert_und_vertrauen_steigt ... ok +test exploit::posterior::tests::prior_ohne_daten_ist_der_default ... ok +test exploit::posterior::tests::verlauf_wird_je_sitz_zugeordnet ... ok +test exploit::style::tests::a_loose_passive_opponent_is_still_a_station ... ok +test exploit::style::tests::a_misread_aggressive_station_earns_little_trust ... ok +test exploit::style::tests::a_passive_station_earns_full_trust ... ok +test exploit::style::tests::a_sticky_non_folder_stays_a_station_even_if_aggressive ... ok +test exploit::style::tests::an_aggressive_loose_folder_is_not_a_station ... ok +test exploit::style::tests::loose_station_trust_ramps_down_with_aggression ... ok +test exploit::style::tests::unknown_aggression_keeps_full_station_trust ... ok +test exploit::style::tests::unknown_aggression_keeps_the_width_based_station ... ok +test exploit::thompson::tests::beta_sampler_matches_moments ... ok +test exploit::thompson::tests::deterministic ... ok +test exploit::thompson::tests::thompson_beats_baseline_regret ... ok +test exploit::thompson::tests::update_is_conjugate ... ok +test game::line::tests::continuation_bet_and_its_response ... ok +test game::line::tests::three_bet_after_opening ... ok +test hand::fast7::tests::known_hands ... ok +test hand::fast7::tests::the_order_matches_the_general_evaluator ... ok +test hand::showdown::tests::the_direct_evaluator_equals_enumeration_everywhere ... ignored +test hand::showdown::tests::the_direct_evaluator_equals_enumeration_on_every_five_card_hand ... ok +test hand::showdown::tests::the_direct_evaluator_knows_wheel_and_steel_wheel ... ok +test icm::risk::tests::jam_depth_gate_full_when_short_zero_when_deep_and_monotone ... ok +test read::straight_draw::perf_tests::the_holdem_shortcut_equals_the_scan_on_every_rank_pattern ... ok +test sim::adaptive::tests::a_passive_hero_leaves_the_ruleset_at_base ... ok +test sim::adaptive::tests::adapt_is_identity_when_static_or_in_warmup ... ok +test sim::adaptive::tests::effect_runs_and_is_finite ... ok +test sim::adaptive::tests::hero_model_counts_postflop_aggression ... ok +test sim::adaptive::tests::l2_model_waits_for_confidence_before_it_counters ... ok +test sim::adaptive::tests::tighten_raises_the_calling_bar_against_an_aggressor ... ok +test sim::aivat::tests::erwartungstreu_ueber_viele_laeufe ... ok +test sim::aivat::tests::kontrollvariate_gleicher_mittelwert_engeres_ci ... ok +test sim::aivat::tests::unkorreliert_keine_verzerrung_kein_schaden ... ok +test sim::exploit_pop::tests::gap_runs_and_is_finite ... ok +test sim::exploit_river::tests::a_fold_everything_strategy_is_exploitable ... ok +test sim::exploit_river::tests::a_nash_strategy_reports_zero_exploitability ... ok +test sim::exploit_river::tests::the_live_engine_runs_and_reports_a_finite_number ... ok +test sim::league::tests::league_scores_every_tier_and_finds_a_floor ... ok +test sim::memory::tests::a_seat_that_only_posts_a_blind_is_not_vpip ... ok +test sim::memory::tests::a_tight_folding_opponent_reads_as_a_nit ... ok +test sim::memory::tests::checks_count_toward_aggression_so_a_passive_opponent_reads_passive ... ok +test sim::memory::tests::line_reads_count_their_own_spots ... ok +test sim::memory::tests::no_read_before_the_warmup ... ok +test sim::memory::tests::per_street_aggression_splits_the_turn_from_the_pooled_read ... ok +test sim::memory::tests::street_fold_is_shrunk_toward_the_pooled_read ... ok +test sim::memory::tests::the_loose_passive_opponent_reads_as_a_calling_station ... ok +test sim::optimize::tests::minimizes_rosenbrock ... ok +test sim::optimize::tests::minimizes_the_sphere ... ok +test sim::optimize::tests::tolerates_noise ... ok +test cfr::turn_river_game::tests::the_best_response_equals_a_brute_force_over_all_pure_strategies ... ok +test sim::population::tests::clusters_stay_distinct ... ok +test sim::population::tests::deterministic_given_seed ... ok +test sim::population::tests::draws_stay_in_bounds ... ok +test sim::population::tests::label_frequencies_track_weights ... ok +test sim::sequential::tests::null_edge_rarely_fires ... ok +test sim::sequential::tests::radius_follows_shrinking_envelope ... ok +test sim::sequential::tests::stops_early_on_a_clear_edge ... ok +test sim::sequential::tests::time_uniform_coverage_under_peeking ... ok +test sim::simreal::tests::induced_hud_orders_the_styles_as_expected ... ok +test sim::optimize::tests::worst_case_opponent_runs_and_is_bounded ... ok +test sim::turnier_leiter::tests::a_bubble_run_is_well_formed ... ok +test sim::turnier_leiter::tests::asymmetric_covered_short_is_well_formed_and_chips_conserve ... ok +test sim::turnier_leiter::tests::deterministic ... ok +test sim::turnier_leiter::tests::harville_conserves_the_pool_and_prices_busts_near_zero ... ok +test sim::turnier_leiter::tests::icm_score_is_zero_for_a_flat_hand_and_signed_with_the_chips ... ok +test sim::simreal::tests::population_induced_hud_is_finite_and_bounded ... ok +test sim::turnier_leiter::tests::winner_take_all_is_the_cash_anchor_no_icm_edge ... ok +test sim::twin_gate::tests::the_gate_accepts_a_strict_improvement_and_rejects_each_regression ... ok +test sim::welt::tests::draws_are_deterministic_and_individual ... ok +test sim::welt::tests::draws_stay_playable ... ok +test sim::welt::tests::polar_bets_big_with_the_nuts_and_with_air ... ok +test sim::welt::tests::sizing_tells_have_the_intended_sign ... ok +test sim::welt::tests::texture_and_position_move_the_bet_rate ... ok +test sim::welt::tests::the_field_draws_every_archetype ... ok +test sim::welt::tests::the_line_archetypes_play_their_line ... ok +test sim::welt::tests::the_table_logs_world_events_and_the_memory_learns ... ok +test sim::welt::tests::the_tanker_slows_down_with_strength ... ok +test sim::welt::tests::world_play_leaves_other_opponents_unlogged ... ok +test sim::welt_memory::tests::a_shown_hand_pairs_its_bets_with_its_strength ... ok +test sim::welt_memory::tests::buckets_and_bands ... ok +test sim::welt_memory::tests::cells_count_by_street_texture_position ... ok +test sim::welt_memory::tests::merge_sums_the_counts ... ok +test sim::welt_memory::tests::shown_river_bets_split_into_air_and_value ... ok +test sim::welt_memory::tests::size_strength_pairs_and_correlation ... ok +test sim::welt_memory::tests::texture_shares_are_usable ... ok +test sim::welt_memory::tests::textures_classify ... ok +test sizing::kelly::tests::fractional_skaliert ... ok +test sizing::kelly::tests::kelly_ist_argmax_des_log_wachstums ... ok +test sizing::kelly::tests::negative_edge_gibt_null ... ok +test sizing::kelly::tests::simulation_kelly_schlaegt_ueber_und_unterwetten ... ok +test sim::twin_gate::tests::evaluate_fills_all_three_axes ... ok + +test result: ok. 219 passed; 0 failed; 7 ignored; 0 measured; 0 filtered out; finished in 73.89s + + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 2 tests +test a_made_pair_still_folds_the_no_bluff_range_at_a_real_price ... ok +test a_made_pair_calls_a_tiny_value_bet_on_pot_odds ... ok + +test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 7 tests +test at_the_reference_size_the_chance_is_fold_to_bet ... ok +test being_raised_after_betting_folds_less ... ok +test bigger_bets_and_bigger_folders_fold_more ... ok +test garbage_inputs_stay_inside_zero_and_the_cap ... ok +test no_bet_no_fold_and_never_certain ... ok +test pressure_is_the_extra_over_a_call_against_the_pot_after_calling ... ok +test without_fold_to_bet_the_style_decides ... ok + +test result: ok. 7 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 2 tests +test the_called_branch_matters ... ok +test bluffs_only_with_a_paying_two_branch_ev ... ok + +test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s + + +running 4 tests +test acceptance_is_fixed_per_hand_and_order_free ... ok +test the_bluff_share_is_met_over_the_whole_range ... ok +test without_a_bluff_share_only_value_passes ... ok +test five_card_ranges_get_bluffs_too ... ok + +test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 5 tests +test a_regular_on_the_river_bluffs_the_balanced_share ... ok +test aggression_overrides_the_style_and_the_cap_holds ... ok +test earlier_streets_hold_less_pure_air ... ok +test styles_order_the_share ... ok +test unknown_size_counts_as_two_thirds_pot ... ok + +test result: ok. 5 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 7 tests +test a_call_continuation_is_as_wide_as_the_villain_calls ... ok +test a_raised_villain_calls_wider_than_a_bet_one ... ok +test a_floor_wider_than_the_share_stays_as_it_is ... ok +test ace_high_does_not_bet_into_a_station_that_never_folds ... ok +test the_calling_range_is_filled_up_to_the_call_frequency ... ok +test without_a_share_only_the_floor_passes ... ok +test top_pair_bets_for_value_into_calling_stations ... ok + +test result: ok. 7 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s + + +running 7 tests +test card_index_roundtrip_and_short_notation ... ok +test deck_is_complete_and_draws_are_distinct_and_reproducible ... ok +test rank_order_and_values ... ok +test ranks_parse_contract_names_and_symbols ... ok +test rng_is_a_value ... ok +test suits_parse ... ok +test variant_rules_table ... ok + +test result: ok. 7 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 9 tests +test frozen_table_has_the_published_values ... ok +test frozen_short_deck_table_has_the_reference_values_and_only_deck_classes ... ok +test matrix_from_triangle_is_antisymmetric_and_rejects_bad_input ... ok +test pair_equity_is_deterministic_per_seed_and_close_across_seeds ... ok +test frozen_table_reproduces_equity_against_a_random_hand ... ok +test pair_equity_rejects_nonsense_without_panicking ... ok +test pair_equity_matches_published_numbers ... ok +test triangle_layout_is_dense_and_covers_every_pair_once ... ok +test sampled_frozen_entries_regenerate_bit_for_bit_from_the_recorded_seed ... ok + +test result: ok. 9 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.03s + + +running 9 tests +test bad_stack_depths_are_faults_not_panics ... ok +test open_tree_has_the_four_documented_decisions ... ok +test environment_rejects_rules_that_are_not_two_card_hold_em ... ok +test push_fold_tree_has_two_decisions_over_169_classes ... ok +test seats_know_how_many_players_act_behind_them ... ok +test players_behind_cost_the_opener_money_when_they_wake_up ... ok +test small_blind_open_identities_are_exact ... ok +test small_blind_push_fold_identities_are_exact ... ok +test wake_range_membership_covers_exactly_the_requested_share_of_combos ... ok + +test result: ok. 9 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.02s + + +running 7 tests +test class_of_cards_is_symmetric_and_rejects_duplicates ... ok +test combo_counts_are_6_4_12_and_total_1326 ... ok +test combos_belong_to_their_class ... ok +test short_deck_chance_weights_total_630_x_561 ... ok +test short_deck_has_81_classes_and_630_combos ... ok +test chance_weights_are_exact_with_card_removal ... ok +test there_are_169_distinct_classes_named_round_trip ... ok + +test result: ok. 7 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 6 tests +test degenerate_inputs_do_not_panic ... ok +test iteration_is_a_pure_fold_and_deterministic ... ok +test kuhn_value_and_exploitability_converge ... ok +test solve_reports_checkpoints_and_stability ... ok +test the_uniform_strategy_is_clearly_exploitable ... ok +test kuhn_strategy_has_the_analytic_shape ... ok + +test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.08s + + +running 14 tests +test every_seat_has_one_to_four_defenders_ending_with_the_big_blind ... ok +test four_defenders_have_every_overcall_history_as_its_own_decision ... ok +test every_terminal_pays_out_exactly_the_chips_put_in ... ok +test gegenprobe_exact_for_one_and_two_defenders ... ok +test more_defenders_narrow_the_open ... ok +test one_and_two_defenders_are_the_old_games_node_for_node ... ok +test sampled_evaluation_matches_the_exact_games ... ok +test gegenprobe_sampled_for_three_and_four_defenders ... ok +test the_frozen_file_is_exactly_what_the_generator_prints ... FAILED +test the_k_way_share_is_the_two_and_three_way_share_of_the_old_games ... ok +test the_sampled_best_response_brackets_the_exact_one ... ok +test the_sampled_solver_reproduces_the_exact_charts_of_the_same_game ... ok +test the_tables_cover_the_plan_and_every_decision ... ok +test the_baseline_is_the_one_defender_game_solved_full_width ... ok + +failures: + +---- the_frozen_file_is_exactly_what_the_generator_prints stdout ---- + +thread 'the_frozen_file_is_exactly_what_the_generator_prints' (48788) panicked at tests\cfr_multi.rs:258:5: +re-rendered table differs from the file +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace + + +failures: + the_frozen_file_is_exactly_what_the_generator_prints + +test result: FAILED. 13 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 10.49s + + +running 5 tests +test all_in_or_fold_variant_uses_the_same_equilibrium ... ok +test every_frozen_push_fold_spot_is_a_nash_equilibrium_within_epsilon ... ok +test every_frozen_open_spot_is_a_nash_equilibrium_within_epsilon ... ok +test the_test_can_fail_a_wrong_strategy_shows_profitable_deviations ... ok +test every_short_deck_spot_is_a_nash_equilibrium_within_epsilon ... ok + +test result: ok. 5 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 3.59s + + +running 8 tests +test a_postflop_pot_is_split_after_the_rake ... ok +test a_raked_leaf_takes_the_rake_from_player_one_as_well ... ok +test a_multi_defender_pot_pays_the_rake_and_a_fold_does_not ... ok +test heads_up_all_in_for_a_fair_coin_costs_each_side_half_the_rake ... ok +test antes_widen_the_defence_again ... ok +test rake_alone_takes_marginal_calls_from_the_defender ... ok +test the_tables_of_the_full_deck_carry_the_rake_and_short_deck_does_not ... ok +test three_way_all_in_splits_the_rake_in_three ... ok + +test result: ok. 8 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.83s + + +running 5 tests +test shares_sum_to_one_and_are_symmetric ... ok +test the_trees_have_the_documented_decisions_and_refuse_bad_input ... ok +test three_way_shares_track_monte_carlo_and_keep_the_order ... ok +test triple_deal_weights_are_a_symmetric_distribution_close_to_the_pairwise_one ... ok +test push_fold_identities ... ok + +test result: ok. 5 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.80s + + +running 4 tests +test a_second_board_of_the_wrong_length_abstains ... ok +test a_second_board_that_repeats_a_card_abstains ... ok +test a_monster_on_both_boards_still_calls ... ok +test nut_on_one_board_dead_on_the_other_folds_to_the_overbet ... ok + +test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.02s + + +running 16 tests +test call_margin_is_required_above_break_even ... ok +test a_plus_ev_call_is_taken_despite_noise ... ok +test call_when_fold_and_check_are_not_available ... ok +test checks_when_free_and_weak ... ok +test clear_call_when_equity_beats_the_price ... ok +test clear_fold_when_equity_is_far_below_the_price ... ok +test confidence_grows_with_distance_from_the_breakpoint ... ok +test decides_just_below_the_breakpoint ... ok +test never_folds_when_check_is_legal ... ok +test no_raise_below_the_value_threshold ... ok +test non_finite_equity_abstains ... ok +test raise_without_candidates_falls_back_to_the_passive_line ... ok +test raises_come_from_allowed_sizes_verbatim ... ok +test raises_when_free_and_strong ... ok +test value_raise_when_equity_is_high ... ok +test value_threshold_comes_from_the_thresholds ... ok + +test result: ok. 16 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s + + +running 12 tests +test call_calls_or_checks_when_free ... ok +test fold_folds_or_checks_when_free ... ok +test jam_is_all_in ... ok +test jam_without_raise_falls_back_to_a_call ... ok +test low_certainty_abstains_when_chips_would_go_in ... ok +test low_certainty_never_blocks_a_free_check_or_a_fold ... ok +test nothing_legal_to_do_abstains ... ok +test raise_snaps_to_allowed_sizes ... ok +test raise_uses_the_preflop_size ... ok +test reason_mentions_the_chart_and_confidence_follows_certainty ... ok +test short_stack_raise_becomes_the_short_all_in ... ok +test unsizeable_raise_falls_back_to_passive ... ok + +test result: ok. 12 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 10 tests +test a_share_that_calls_heads_up_folds_four_way ... ok +test a_share_that_value_raises_heads_up_only_calls_three_way ... ok +test each_extra_villain_discounts_equity_and_raises_the_bars ... ok +test effective_thresholds_combine_texture_and_player_count ... ok +test folded_villains_do_not_count ... ok +test heads_up_changes_nothing ... ok +test no_live_villain_counts_as_one ... ok +test semibluff_works_two_way_but_not_three_way ... ok +test semibluffs_need_at_most_two_villains ... ok +test the_reason_names_the_player_count_when_multiway ... ok + +test result: ok. 10 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 6 tests +test enforce_is_idempotent ... ok +test enforce_is_sound_for_arbitrary_decisions ... ok +test nothing_beats_nothing_never_raises_on_the_board_alone ... ok +test postflop_raise_sizes_come_from_the_menu_and_confidence_is_bounded_before_enforcement ... ok +test postflop_choices_survive_enforcement_on_random_spots ... ok +test preflop_plans_survive_enforcement_on_random_spots ... ok + +test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.05s + + +running 6 tests +test nonsense_hands_are_judged_by_their_percentile_and_never_panic ... ok +test keeps_exactly_the_hands_inside_the_percentile_band ... ok +test the_full_range_keeps_every_valid_hand ... ok +test the_lower_bound_cuts_off_the_very_best_hands ... ok +test top_spec_keeps_the_best_hands_only ... ok +test works_for_five_card_hands ... ok + +test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 6 tests +test der_read_einer_calling_station_bleibt ... ok +test der_read_eines_regs_wird_fallen_gelassen ... ok +test der_rest_des_spots_bleibt_unberuehrt ... ok +test die_earned_trust_tabelle_treibt_den_riegel ... ok +test gemischter_tisch_nur_die_schwachen_reads_bleiben ... ok +test nur_die_calling_station_ist_ausbeutungswuerdig ... ok + +test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 6 tests +test a_four_flush_board_is_named_before_its_wetness ... ok +test draws_are_named ... ok +test every_made_class_has_a_distinct_nonempty_name ... ok +test names_the_made_hand_and_the_board ... ok +test no_draw_text_for_nothing_or_backdoor ... ok +test the_decision_reason_names_the_read ... ok + +test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 8 tests +test board_only_never_raises_even_with_a_huge_share ... ok +test a_semibluff_is_also_possible_when_the_raise_is_the_only_way_to_continue_cheaply ... ok +test eight_outs_count_as_a_real_draw_even_for_a_gutshot_class ... ok +test flush_draw_with_good_fold_equity_raises ... ok +test no_semibluff_on_the_river ... ok +test pure_bluffs_without_equity_stay_off ... ok +test the_same_draw_only_calls_against_a_calling_station ... ok +test which_reads_are_real_draws ... ok + +test result: ok. 8 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 7 tests +test a_committed_stack_may_jam_for_value ... ok +test bluffs_stay_smaller_than_value ... ok +test ladder_fraction_empties_the_stack_in_n_equal_bets ... ok +test ladder_streets_follow_the_spr_bands ... ok +test spr_is_stack_over_pot ... ok +test thin_hands_do_not_stack_off ... ok +test value_bets_use_the_value_band_and_only_allowed_sizes ... ok + +test result: ok. 7 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 13 tests +test board_only_never_raises ... ok +test medium_hand_on_a_dry_board_may_still_value_raise_but_needs_more ... ok +test medium_hand_on_a_four_flush_board_never_value_raises ... ok +test medium_hand_on_a_wet_board_loses_the_thin_value_raise_and_pays_more ... ok +test monsters_are_never_moved ... ok +test outputs_stay_inside_their_ranges ... ok +test strong_hand_on_a_dry_board_raises_slightly_below_the_value_threshold ... ok +test strong_hand_on_a_four_flush_board_is_more_careful_still ... ok +test strong_hand_on_a_wet_board_wants_more_equity_to_raise ... ok +test unknown_wetness_is_treated_as_medium ... ok +test weak_hand_not_facing_a_bet_keeps_the_plain_call_margin ... ok +test weak_hand_with_a_draw_keeps_the_plain_call_margin ... ok +test weak_hand_without_draw_facing_a_bet_is_stricter ... ok + +test result: ok. 13 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 7 tests +test a_medium_hand_ahead_of_the_table_may_bet_thin_on_turn_and_river ... ok +test a_thin_bet_bets_when_sure_and_is_held_back_inside_its_ev_error ... ok +test never_on_the_flop_and_never_raising_a_bet ... ok +test only_medium_hands_and_only_where_value_is_allowed ... ok +test the_favourite_share_is_the_border ... ok +test top_pair_bets_the_turn_into_calling_stations_and_bets_small ... ok +test the_recorded_spots_outside_thin_value_stay_as_they_were ... ok + +test result: ok. 7 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s + + +running 8 tests +test confidence_never_leaves_its_range ... ok +test confidence_rises_linearly_from_the_edge_to_the_rim_of_the_band ... ok +test folds_just_below_the_effective_breakpoint ... ok +test invalid_equity_stays_at_zero_confidence ... ok +test just_under_the_breakpoint_folds_decisively ... ok +test marginal_raise_versus_call_abstains_with_small_confidence ... ok +test the_multiway_adjusted_breakpoint_still_decides ... ok +test the_texture_adjusted_breakpoint_still_decides ... ok + +test result: ok. 8 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 8 tests +test deck_exhaustion_is_reported ... ok +test board_sizes_other_than_0_3_4_5_are_invalid ... ok +test duplicate_cards_are_inconsistent ... ok +test exact_villain_clashing_with_dead_cards_is_inconsistent ... ok +test wrong_exact_villain_card_count_is_invalid ... ok +test wrong_hero_card_count_is_invalid ... ok +test exactly_enough_cards_is_fine ... ok +test zero_trials_is_invalid ... ok + +test result: ok. 8 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 13 tests +test different_seeds_usually_differ ... ok +test estimate_invariants_hold ... ok +test exact_and_any_ranges_mix ... ok +test filter_predicate_only_accepted_hands_are_played_and_never_overlap_hero ... ok +test filter_for_strong_hands_lowers_hero_equity ... ok +test heads_up_share_is_win_plus_half_the_ties ... ok +test filter_range_constrains_villain_hands ... ok +test no_villains_means_hero_takes_the_pot ... ok +test plo5_five_card_hands_are_dealt_to_filters ... ok +test returned_rng_is_advanced_so_calls_can_be_chained ... ok +test impossible_filter_falls_back_to_an_unfiltered_hand_without_failing ... ok +test std_error_matches_binomial_scale_and_shrinks_with_trials ... ok +test same_seed_gives_identical_estimate_and_rng ... ok + +test result: ok. 13 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.02s + + +running 14 tests +test ace_king_offsuit_versus_queens_is_about_43_percent ... ok +test ace_king_offsuit_against_one_random_hand_is_about_65_percent ... ok +test ace_king_suited_versus_deuces_is_a_coin_flip ... ok +test aces_against_three_random_hands_is_about_64_percent ... ok +test aces_versus_kings_preflop_is_about_82_percent ... ok +test flop_nut_flush_draw_versus_overpair_matches_the_nine_out_rule ... ok +test plo5_river_board_flush_does_not_play_without_two_suited_hole_cards ... ok +test plo5_river_nut_flush_versus_lower_flush_is_certain ... ok +test plo5_flop_versus_random_hands_is_dominated_by_the_nut_draw ... ok +test river_board_plays_splits_the_pot_exactly ... ok +test river_dominated_hand_loses_every_trial ... ok +test river_royal_flush_wins_every_trial ... ok +test river_three_way_tie_gives_a_third ... ok +test plo5_turn_spot_matches_exact_enumeration ... ok + +test result: ok. 14 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.10s + + +running 9 tests +test adjust_is_pure ... ok +test adjustments_compose_with_a_non_default_base ... ok +test aggressive_players_are_called_wider ... ok +test calling_stations_are_value_bet_thinner_and_not_bluffed ... ok +test fold_to_bet_no_longer_moves_the_shared_scale ... ok +test nits_fold_more_and_bet_strong ... ok +test no_information_changes_nothing ... ok +test outputs_stay_in_sane_ranges_for_any_input ... ok +test several_profiles_combine_conservatively ... ok + +test result: ok. 9 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 8 tests +test always_in_the_half_open_unit_interval ... ok +test bigger_bets_mean_narrower_ranges ... ok +test folded_villains_do_not_count_as_multiway ... ok +test later_streets_mean_narrower_ranges ... ok +test looser_players_hold_wider_ranges ... ok +test passive_multiway_pots_are_wider_than_heads_up ... ok +test sticky_players_hold_wider_ranges_than_foldy_ones ... ok +test unknown_profile_uses_a_documented_default ... ok + +test result: ok. 8 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 9 tests +test a_malformed_hands_count_is_an_invalid_request ... ok +test few_hands_read_as_regular ... ok +test many_hands_keep_the_reads ... ok +test missing_values_stay_missing ... ok +test no_hands_is_the_population ... ok +test no_profile_no_reads ... ok +test the_answer_says_how_it_read_each_villain ... ok +test trust_grows_with_hands ... ok +test without_hands_the_profile_counts_fully ... ok + +test result: ok. 9 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 6 tests +test loose_and_passive_or_sticky_is_a_calling_station ... ok +test loose_and_raising_is_loose_aggressive ... ok +test nothing_known_is_unknown ... ok +test ordinary_numbers_are_regular ... ok +test out_of_range_values_are_clamped_not_trusted ... ok +test tight_players_are_nits ... ok + +test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 11 tests +test all_in_or_fold_answers_exactly_like_push_fold ... ok +test between_grid_depths_the_frequencies_are_linearly_interpolated ... ok +test classes_come_from_cards ... ok +test grid_depths_return_the_table_entry_exactly ... ok +test nonsense_inputs_are_refused_not_panicked_on ... ok +test outside_the_grid_the_nearest_table_is_used ... ok +test positions_map_to_chart_seats ... ok +test short_deck_reads_its_own_tables ... ok +test the_small_blind_as_first_actor_has_no_small_blind_or_overcall_rows ... ok +test the_tables_for_both_blinds_are_read_from_their_own_rows ... ok +test unsupported_variants_have_no_chart ... ok + +test result: ok. 11 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 16 tests +test all_in_or_fold_tables_are_the_push_fold_tables ... ok +test aces_always_raise_or_jam_and_never_fold ... ok +test convergence_metadata_is_consistent ... ok +test early_and_middle_open_narrower_with_two_defenders ... FAILED +test heads_up_small_blind_matches_published_push_fold_nash ... FAILED +test open_ranges_widen_with_position_as_subsets ... FAILED +test both_blinds_play_and_the_overcall_is_tighter_than_the_call ... ok +test open_width_is_roughly_stable_across_depth_and_never_degenerate ... ok +test permille_rows_are_well_formed ... ok +test short_deck_tables_hold_only_deck_classes_and_look_like_poker ... ok +test push_ranges_widen_with_position_as_subsets ... ok +test stronger_hands_are_never_played_less_than_clearly_weaker_ones ... ok +test tables_cover_every_seat_and_depth_exactly_once ... ok +test the_big_blind_calls_wider_against_wider_pushing_seats ... ok +test shorter_stacks_jam_and_call_wider ... ok +test tight_seats_defend_less_than_they_open_wide_and_big_blind_defends_widest_against_the_button ... ok + +failures: + +---- early_and_middle_open_narrower_with_two_defenders stdout ---- + +thread 'early_and_middle_open_narrower_with_two_defenders' (46612) panicked at tests\generated_charts_plausibility.rs:276:13: +EP 20bb: 0.2850678733031674 vs one-defender 0.288 +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace + +---- heads_up_small_blind_matches_published_push_fold_nash stdout ---- + +thread 'heads_up_small_blind_matches_published_push_fold_nash' (51912) panicked at tests\generated_charts_plausibility.rs:210:5: +SB 10bb push 0.7328657616892911 + +---- open_ranges_widen_with_position_as_subsets stdout ---- + +thread 'open_ranges_widen_with_position_as_subsets' (47632) panicked at tests\generated_charts_plausibility.rs:159:17: +class 97 CO -> BTN at 40bb + + +failures: + early_and_middle_open_narrower_with_two_defenders + heads_up_small_blind_matches_published_push_fold_nash + open_ranges_widen_with_position_as_subsets + +test result: FAILED. 13 passed; 3 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s + + +running 10 tests +test a_short_deck_push_fold_spot_is_reproduced_bit_for_bit ... ok +test an_open_spot_is_reproduced_bit_for_bit ... ok +test iteration_counts_in_the_tables_are_the_plan ... ok +test rendering_is_pure_and_describes_every_spot ... ok +test a_push_fold_spot_is_reproduced_bit_for_bit has been running for over 60 seconds +test the_all_in_or_fold_rules_generate_the_same_push_fold_tables has been running for over 60 seconds +test a_push_fold_spot_is_reproduced_bit_for_bit ... ok +test the_all_in_or_fold_rules_generate_the_same_push_fold_tables ... ok +test the_argmax_chart_is_final_from_the_recorded_iteration_on_the_small_blind_open_spots ... ok +test the_frozen_chart_file_is_exactly_what_the_generator_prints ... FAILED +test the_frozen_equity_file_is_exactly_what_the_generator_prints ... ok +test the_argmax_chart_is_final_from_the_recorded_iteration_on_sampled_push_fold_spots ... ok + +failures: + +---- the_frozen_chart_file_is_exactly_what_the_generator_prints stdout ---- + +thread 'the_frozen_chart_file_is_exactly_what_the_generator_prints' (50248) panicked at tests\generated_charts_reproduce.rs:149:5: +generated_charts.rs differs from the renderer output +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace + + +failures: + the_frozen_chart_file_is_exactly_what_the_generator_prints + +test result: FAILED. 9 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 207.86s + + +running 12 tests +test binary_call_that_covers_the_stack_is_an_all_in ... ok +test abstain_stays_abstain ... ok +test binary_check_is_allowed ... ok +test binary_variants_allow_only_give_up_or_all_in ... ok +test fold_is_turned_into_check_when_check_is_legal ... ok +test free_raise_is_clamped_to_bounds_and_stack ... ok +test illegal_kinds_become_abstain_with_a_reason ... ok +test legal_choices_pass_through ... ok +test raise_is_snapped_to_allowed_sizes_exactly ... ok +test raise_with_no_affordable_allowed_size_abstains ... ok +test raise_with_non_finite_size_or_no_stack_abstains ... ok +test repairs_are_mentioned_in_the_reason ... ok + +test result: ok. 12 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 7 tests +test call_moves_to_call_into_the_pot ... ok +test call_is_capped_by_the_stack ... ok +test chips_are_conserved_and_the_stack_never_negative ... ok +test garbage_sizes_move_nothing ... ok +test passive_choices_change_nothing ... ok +test raise_beyond_the_stack_is_an_all_in_at_most ... ok +test raise_moves_the_full_size ... ok + +test result: ok. 7 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 16 tests +test allowed_sizes_must_be_positive_and_finite ... ok +test a_consistent_spot_passes_unchanged ... ok +test big_blind_must_be_positive ... ok +test check_is_fine_when_nothing_is_owed ... ok +test check_while_facing_a_bet_is_inconsistent ... ok +test duplicate_cards_are_rejected ... ok +test faults_are_values_of_the_shared_type ... ok +test legal_actions_must_be_non_empty_and_distinct ... ok +test min_raise_above_max_raise_is_rejected ... ok +test non_finite_or_negative_chips_are_rejected ... ok +test raise_sized_by_allowed_sizes_alone_is_fine ... ok +test raise_with_no_way_to_size_it_is_inconsistent ... ok +test raise_without_bounds_is_fine_while_hero_has_chips ... ok +test seats_must_be_between_two_and_ten ... ok +test wrong_board_length_for_the_street_is_rejected ... ok +test wrong_hole_card_count_is_rejected_per_variant ... ok + +test result: ok. 16 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 13 tests +test categories_are_totally_ordered_in_poker_order ... ok +test broadway_is_the_highest_straight_and_no_wraparound ... ok +test flush_compares_card_by_card ... ok +test full_house_compares_trips_before_pair ... ok +test identical_ranks_in_different_suits_tie ... ok +test kickers_decide_within_a_category ... ok +test order_of_cards_and_suits_do_not_matter ... ok +test quads_compare_rank_then_kicker ... ok +test recognises_every_category ... ok +test steel_wheel_is_a_straight_flush_below_a_six_high_one ... ok +test two_pair_compares_high_pair_then_low_pair_then_kicker ... ok +test weakest_and_strongest_hands_bound_everything ... ok +test wheel_is_the_lowest_straight_and_ace_plays_low ... ok + +test result: ok. 13 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s + + +running 14 tests +test holdem_board_plays ... ok +test bad_input_is_a_fault_never_a_panic ... ok +test holdem_kicker_split_and_win ... ok +test holdem_picks_best_five_of_seven ... ok +test holdem_seven_card_flush_beats_straight ... ok +test holdem_two_trips_make_a_full_house ... ok +test holdem_works_with_five_and_six_cards ... ok +test omaha_board_straight_does_not_play_without_two_hole_cards ... ok +test omaha_exactly_two_blocks_quads_from_three_hole_cards ... ok +test omaha_five_hole_cards_nut_flush_beats_lower_flush ... ok +test omaha_needs_three_board_cards ... ok +test omaha_needs_two_hole_cards_for_a_flush ... ok +test omaha_picks_the_best_of_all_pairings ... ok +test omaha_split_pot_on_identical_best_five ... ok + +test result: ok. 14 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 9 tests +test amount_must_be_a_non_negative_number ... ok +test bad_types_are_faults ... ok +test contract_example_without_history_has_an_empty_history ... ok +test decodes_every_field_in_order ... ok +test entry_must_be_an_object ... ok +test every_action_name_is_accepted ... ok +test faults_carry_the_path_of_the_entry ... ok +test history_must_be_an_array ... ok +test null_and_empty_history_are_empty ... ok + +test result: ok. 9 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 11 tests +test a_chip_is_worth_less_than_it_costs_to_lose_one ... ok +test an_unusable_situation_abstains ... ok +test equal_stacks_are_worth_the_same_and_one_winner_takes_first ... ok +test equities_pay_out_exactly_the_prize_pool ... ok +test no_bet_to_face_costs_no_premium ... ok +test only_facing_an_aggressor_costs_a_premium ... ok +test the_defence_width_factor_is_concave_and_floored ... ok +test the_required_equity_exceeds_the_chip_break_even_on_the_bubble ... ok +test winner_takes_all_has_no_premium ... ok +test without_a_situation_nothing_changes ... ok +test bubble_spots_call_narrower_than_cash_at_every_depth ... ok + +test result: ok. 11 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.04s + + +running 8 tests +test first_duplicate_key_wins ... ok +test optional_treats_absent_and_null_as_none ... ok +test paths_compose ... ok +test required_finds_and_reports_missing_with_path ... ok +test required_on_non_object_is_invalid ... ok +test typed_accessors ... ok +test typed_accessors_report_path_on_wrong_type ... ok +test whole_numbers ... ok + +test result: ok. 8 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 10 tests +test arrays_and_objects ... ok +test depth_limit_is_an_error_not_a_crash ... ok +test literals ... ok +test number_errors ... ok +test numbers ... ok +test object_preserves_key_order_and_duplicates ... ok +test string_errors ... ok +test strings_and_escapes ... ok +test structural_errors ... ok +test syntax_error_mentions_position ... ok + +test result: ok. 10 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s + + +running 8 tests +test containers_have_no_whitespace_and_keep_order ... ok +test f64_round_trip_is_exact ... ok +test non_finite_numbers_become_null ... ok +test numbers_render_exactly_as_given ... ok +test parse_render_round_trip ... ok +test rendered_output_is_always_one_line ... ok +test scalars ... ok +test string_escaping ... ok + +test result: ok. 8 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 3 tests +test the_cbet_is_priced_by_fold_to_cbet ... ok +test the_check_raise_sits_in_the_tree ... ok +test a_three_bet_folder_gets_three_bet_light ... ok + +test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 5 tests +test bluff_break_even_is_risk_over_risk_plus_pot ... ok +test call_break_even_is_call_over_final_pot ... ok +test degenerate_input_yields_zero_not_nan ... ok +test empty_pot_needs_all_equity ... ok +test free_call_needs_no_equity ... ok + +test result: ok. 5 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 11 tests +test call_is_share_of_final_pot_minus_price ... ok +test check_is_share_of_pot ... ok +test default_fold_equity_is_bet_over_pot_plus_bet ... ok +test fold_equity_compounds_across_villains ... ok +test fold_equity_is_capped_and_total ... ok +test fold_equity_scales_with_threshold_scale ... ok +test fold_is_zero ... ok +test raise_mixes_fold_equity_and_called_outcome ... ok +test raise_over_a_bet_only_adds_the_difference_for_villain ... ok +test raise_with_full_fold_equity_wins_the_pot ... ok +test raise_with_no_fold_equity_and_no_equity_loses_the_bet ... ok + +test result: ok. 11 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 10 tests +test a_bluff_catcher_calls_the_maniac ... ok +test draws_raise_as_semibluffs_not_as_pure_bluffs ... ok +test a_value_hand_still_calls_or_raises_the_nit ... ok +test fewer_bluffs_against_the_station_more_against_the_nit ... ok +test never_bluff_someone_who_never_folds ... ok +test steal_wider_against_nits_in_the_blinds ... FAILED +test no_bluff_catch_against_a_range_without_bluffs ... ok +test the_calling_station_does_not ... ok +test the_nit_gets_bluffed_with_air ... ok +test the_same_bluff_catcher_folds_to_the_nit ... ok + +failures: + +---- steal_wider_against_nits_in_the_blinds stdout ---- + +thread 'steal_wider_against_nits_in_the_blinds' (27176) panicked at tests\pipeline_bluff.rs:97:5: +assertion failed: ["FOLD", "ABSTAIN"].contains(&action(&respond(&steal(hero, ""))).as_str()) +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace + + +failures: + steal_wider_against_nits_in_the_blinds + +test result: FAILED. 9 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.02s + + +running 13 tests +test aof_is_binary ... ok +test check_is_preferred_over_fold_when_free ... ok +test contract_example_with_full_flop_answers_legally_from_allowed_sizes ... ok +test contract_example_with_one_card_flop_is_refused_with_abstain ... ok +test drawing_dead_on_the_river_facing_a_bet_folds ... ok +test garbage_and_empty_objects_abstain ... ok +test k_poker_raises_only_from_menu ... ok +test identical_requests_give_identical_answers ... ok +test preflop_aces_on_the_button_raise ... ok +test preflop_trash_folds_or_abstains ... ok +test response_has_contract_keys_in_order ... ok +test river_nuts_never_folds_and_bets_when_possible ... ok +test plo5_requires_five_hole_cards ... ok + +test result: ok. 13 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.04s + + +running 10 tests +test a_malformed_second_board_is_refused_with_its_path ... ok +test a_card_on_both_boards_or_in_hand_is_refused ... ok +test a_second_board_of_another_length_is_refused ... ok +test null_means_no_second_board ... ok +test named_references_hold_for_each_board_alone ... ok +test the_answer_stays_legal ... ok +test one_board_improves_the_hand_the_other_does_not_the_better_judgement_wins ... ok +test the_reason_names_the_board_and_the_approximation ... ok +test the_order_of_the_boards_does_not_matter ... ok +test works_on_turn_and_river_too ... ok + +test result: ok. 10 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s + + +running 2 tests +test without_the_new_fields_every_answer_is_unchanged ... ok +test ritoffered_false_and_boarddouble_null_are_the_same_as_absent ... ok + +test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.02s + + +running 6 tests +test a_beginner_mark_changes_the_recommendation ... ok +test a_fish_mark_counts_like_a_beginner ... ok +test a_mark_fills_only_the_missing_fields ... ok +test a_mark_that_is_no_text_is_refused ... ok +test an_unknown_mark_changes_nothing ... ok +test measured_values_beat_the_mark ... ok + +test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 8 tests +test any_other_number_of_hole_cards_is_refused ... ok +test a_real_plo4_request_is_answered_not_rejected ... ok +test double_board_works_on_the_turn_as_well ... ok +test omaha_rule_exactly_two_hole_cards_decide_the_hand ... ok +test omaha_rule_four_hole_cards_cannot_be_used_together ... ok +test double_board_reason_names_the_judgement_of_both_boards ... ok +test the_bomb_pot_turn_is_answered_too ... ok +test raises_never_exceed_the_pot ... ok + +test result: ok. 8 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.58s + + +running 6 tests +test a_hole_pair_plus_a_board_match_is_read_as_a_set ... ok +test any_other_number_of_hole_cards_is_refused ... ok +test a_real_plo5_request_is_answered_not_rejected ... ok +test four_suited_hole_cards_cannot_make_a_flush ... ok +test two_hole_connectors_make_a_straight_with_three_board_cards ... ok +test raises_never_exceed_the_pot ... ok + +test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.64s + + +running 11 tests +test malformed_history_abstains_with_its_path ... ok +test position_is_derived_from_history_when_button_is_missing ... ok +test no_semibluff_on_the_river ... ok +test preflop_raiser_betting_flop_and_turn_narrows_range_so_middle_pair_gives_up ... ok +test reasons_name_the_hand_read ... ok +test short_deck_flush_is_played_as_a_monster_over_a_full_house_draw ... ok +test short_deck_rejects_cards_below_six ... ok +test short_deck_and_its_alias_are_accepted ... ok +test short_deck_respects_allowed_sizes ... ok +test top_pair_continues_heads_up_but_folds_four_way ... ok +test uncertain_abstain_carries_small_but_positive_confidence ... ok + +test result: ok. 11 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.04s + + +running 2 tests +test answers_are_reproducible_per_seed ... ok +test every_answer_is_legal_sized_and_conserves_chips ... ok + +test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 10.08s + + +running 8 tests +test a_non_boolean_offer_is_refused ... ok +test above_break_even_accepts ... ok +test below_break_even_declines ... ok +test no_offer_no_rit_field ... ok +test the_offer_does_not_change_the_action ... ok +test with_nothing_to_call_the_fair_share_is_the_break_even_point ... ok +test without_an_equity_estimate_it_abstains ... ok +test works_together_with_a_double_board ... ok + +test result: ok. 8 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s + + +running 11 tests +test a_field_beyond_the_largest_priced_one_abstains ... ok +test a_bubble_on_the_wire_calls_fewer_jams_than_cash ... ok +test a_malformed_tournament_is_an_invalid_request ... ok +test a_null_tournament_is_cash ... ok +test a_sampled_field_may_pay_every_place ... ok +test a_tournament_that_cannot_be_priced_abstains_instead_of_guessing ... ok +test sampled_equities_agree_with_the_exact_expansion ... ok +test sampled_equities_pay_out_the_pool_and_follow_the_stacks ... ok +test up_to_the_exact_limit_the_expansion_is_exact ... ok +test winner_takes_all_is_cash_on_the_wire ... ok +test a_field_larger_than_the_exact_expansion_is_still_priced ... ok + +test result: ok. 11 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 15.83s + + +running 5 tests +test parses_and_is_named ... ok +test exactly_two_hole_cards_bites ... ok +test percentile_is_ordered_and_reaches_the_top_band ... ok +test plo5_unchanged ... ok +test six_hole_cards_pot_limit_two_of_them ... ok + +test result: ok. 5 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 7 tests +test advise_reasons_name_the_inferred_position ... ok +test advise_with_an_inferred_button_equals_advise_with_the_explicit_one ... ok +test advise_without_button_or_history_keeps_the_unknown_label ... ok +test explicit_button_beats_a_conflicting_history ... ok +test seat_position_stays_unknown_without_any_hint ... ok +test seat_position_uses_the_explicit_button ... ok +test seat_position_uses_the_inferred_button ... ok + +test result: ok. 7 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 16 tests +test absurd_inputs_are_none ... ok +test ambiguous_numbering_with_a_wrap_is_unknown ... ok +test ambiguous_numbering_without_a_wrap_is_fine ... ok +test both_blinds_that_agree_give_the_same_button ... ok +test button_is_one_before_the_small_blind ... ok +test conflicting_blinds_trust_the_small_blind ... ok +test explicit_button_wins_over_history ... ok +test heads_up_the_small_blind_is_the_button ... ok +test heads_up_with_only_the_big_blind_the_other_seat_is_the_button ... ok +test inferred_button_agrees_with_every_explicit_layout ... ok +test nothing_to_infer_from_is_none ... ok +test numbering_base_comes_from_every_seat_in_play ... ok +test only_preflop_posts_count ... ok +test only_the_big_blind_known_puts_the_button_two_before ... ok +test small_blind_in_the_first_seat_wraps_to_the_last ... ok +test the_first_post_of_each_kind_counts ... ok + +test result: ok. 16 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 5 tests +test cutoff_is_the_seat_before_the_button_and_utg_the_first_after_the_big_blind ... ok +test early_middle_split_counts_for_every_table_size ... ok +test every_seat_at_every_table_size_and_numbering ... ok +test heads_up_button_is_the_small_blind_and_the_other_the_big_blind ... ok +test numbering_base_does_not_matter ... ok + +test result: ok. 5 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 20 tests +test all_in_or_fold_only_ever_jams_or_folds ... ok +test all_in_or_fold_uses_the_effective_stack ... ok +test big_blind_checks_its_option_with_anything ... ok +test borderline_hands_are_less_certain_than_clear_ones ... ok +test degenerate_numbers_do_not_panic ... ok +test facing_a_limp_isolates_with_strong_hands ... ok +test facing_a_three_bet_continues_only_with_the_top ... ok +test facing_an_all_in_depends_on_the_price ... ok +test facing_an_open_three_bets_calls_or_folds ... ok +test heads_up_button_opens_most_hands ... ok +test invalid_hole_cards_fold_without_panicking ... ok +test omaha_five_cards_use_the_same_charts ... ok +test omaha_four_cards_use_the_same_charts_with_their_own_ranking ... ok +test all_in_or_fold_gets_wider_when_shorter ... ok +test plan_carries_percentile_certainty_and_reason ... ok +test premium_hands_open_everywhere_and_trash_never_does ... ok +test opening_range_widens_towards_the_button ... ok +test short_stacks_turn_raises_into_jams ... ok +test range_width_scale_widens_and_narrows ... ok +test unknown_position_uses_the_early_chart ... ok + +test result: ok. 20 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.29s + + +running 6 tests +test a_big_pot_without_ante_records_still_counts_as_limped ... ok +test a_full_table_of_antes_is_still_first_in ... ok +test a_limper_is_still_a_limper_with_antes ... ok +test an_open_is_still_an_open_with_antes ... ok +test the_small_blind_first_in_reads_the_table_with_antes ... ok +test unusable_ante_amounts_are_ignored ... ok + +test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 7 tests +test a_caller_other_than_the_small_blind_leaves_the_tables ... ok +test short_deck_unopened_pots_use_the_short_deck_tables ... ok +test the_big_blind_after_a_small_blind_fold_or_call_reads_different_tables ... ok +test the_heads_up_big_blind_facing_a_button_jam_reads_the_call_table ... ok +test the_opener_facing_a_small_blind_three_bet_reads_its_own_table ... ok +test the_small_blind_facing_a_jam_with_the_big_blind_behind_reads_its_own_table ... ok +test the_small_blind_facing_an_open_reads_its_own_table ... ok + +test result: ok. 7 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 16 tests +test ein_billiger_call_tief_im_stack_bleibt_der_chart_ueberlassen ... ok +test der_letzte_rest_in_einen_grossen_pot_wird_nie_gefoldet ... ok +test fold_bei_schlechtem_preis_bleibt_fold ... ok +test im_alles_oder_nichts_spiel_nie_ein_call ... ok +test invariante_nie_folden_wenn_der_allin_preis_stimmt ... ok +test invariante_nie_jammen_wenn_der_stack_preis_es_nicht_traegt ... ok +test jam_bei_mieser_hand_und_mieser_preis_wird_fold ... ok +test jam_das_der_preis_nicht_traegt_wird_zum_call ... ok +test normale_raise_weit_unter_allin_bleibt ... ok +test ohne_einsatz_bleibt_alles_wie_es_ist ... ok +test open_ohne_gegenwette_bleibt ... ok +test premium_jam_bleibt_jam ... ok +test raise_und_call_bleiben_unberuehrt ... ok +test ueber_grosse_raise_mieser_preis_mieser_hand_wird_fold ... ok +test ueber_grosse_raise_mit_premium_bleibt ... ok +test ueber_grosse_raise_ohne_committbare_hand_wird_zum_call ... ok + +test result: ok. 16 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 7 tests +test a_defender_that_is_not_a_blind_now_reads_the_table ... FAILED +test a_four_handed_cutoff_reads_the_six_max_cutoff_lineup ... ok +test a_full_table_opens_tighter_from_early_position ... FAILED +test a_second_defender_changes_the_button_open ... FAILED +test a_short_table_keeps_lineups_and_the_blind_battle_only ... ok +test where_the_multi_tables_do_not_reach_the_old_answer_stays ... ok +test postflop_never_reads_the_preflop_tables ... ok + +failures: + +---- a_defender_that_is_not_a_blind_now_reads_the_table stdout ---- + +thread 'a_defender_that_is_not_a_blind_now_reads_the_table' (26116) panicked at tests\preflop_multi_advice.rs:110:5: +assertion `left == right` failed: BTN vs open, CFR BTN vs open 40bb vs 4 defenders: raise 93% + left: Raise + right: Call +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace + +---- a_full_table_opens_tighter_from_early_position stdout ---- + +thread 'a_full_table_opens_tighter_from_early_position' (53180) panicked at tests\preflop_multi_advice.rs:97:5: +assertion `left == right` failed: EP open, CFR open 40bb vs 4 defenders: raise 94% + left: Raise + right: Fold + +---- a_second_defender_changes_the_button_open stdout ---- + +thread 'a_second_defender_changes_the_button_open' (44984) panicked at tests\preflop_multi_advice.rs:79:5: +assertion `left == right` failed: BTN open, CFR open 40bb vs 2 defenders: raise 99% + left: Raise + right: Fold + + +failures: + a_defender_that_is_not_a_blind_now_reads_the_table + a_full_table_opens_tighter_from_early_position + a_second_defender_changes_the_button_open + +test result: FAILED. 4 passed; 3 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s + + +running 10 tests +test aces_are_best_and_seven_deuce_is_near_worst ... ok +test every_combo_maps_into_unit_interval_and_averages_one_half ... ok +test hold_em_family_shares_one_table ... ok +test invalid_hands_are_worst_not_panics ... ok +test pairs_descend ... ok +test many_calls_are_cheap_and_deterministic ... ok +test ranking_table_has_169_distinct_classes ... ok +test suit_and_card_order_do_not_matter ... ok +test suited_beats_offsuit_for_every_unpaired_class ... ok +test well_known_orderings_hold ... ok + +test result: ok. 10 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 8 tests +test four_card_rundowns_and_broadways_rank_high_without_a_fifth_card ... ok +test double_suited_big_pairs_beat_rainbow_junk ... ok +test four_card_structure_is_valued ... ok +test only_four_distinct_cards_are_ranked ... ok +test percentile_is_monotone_in_the_score ... ok +test print_table ... ignored +test the_table_reproduces_from_the_score_distribution ... FAILED +test the_ranking_agrees_with_sampled_equity ... ok + +failures: + +---- the_table_reproduces_from_the_score_distribution stdout ---- + +thread 'the_table_reproduces_from_the_score_distribution' (52276) panicked at tests\preflop_plo4.rs:75:5: +assertion `left == right` failed + left: 231 + right: 233 +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace + + +failures: + the_table_reproduces_from_the_score_distribution + +test result: FAILED. 6 passed; 1 failed; 1 ignored; 0 measured; 0 filtered out; finished in 5.61s + + +running 11 tests +test bigger_pairs_beat_smaller_pairs ... ok +test connected_rundowns_beat_scattered_cards_of_same_top ... ok +test double_suited_beats_single_suited_with_same_ranks ... ok +test double_suited_big_pairs_beat_rainbow_junk ... ok +test percentile_is_monotone_in_score ... ok +test random_hands_spread_evenly_over_the_unit_interval ... ok +test calibrated_chart_fixes_known_misrankings ... ok +test score_rejects_wrong_card_counts ... ok +test suit_permutation_does_not_change_the_value ... ok +test trips_and_quads_are_penalised ... ok +test score_ordering_tracks_real_equity ... ok + +test result: ok. 11 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 7.90s + + +running 8 tests +test five_handed_has_one_early_seat ... ok +test heads_up_button_is_small_blind ... ok +test labels_are_short_and_distinct ... ok +test nine_and_ten_handed_split_early_and_middle ... ok +test six_max_one_based ... ok +test six_max_zero_based ... ok +test three_and_four_handed ... ok +test unknown_when_button_missing_or_input_absurd ... ok + +test result: ok. 8 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 6 tests +test completes_king_three_offsuit_against_one_limper ... ok +test folds_only_the_offsuit_trash ... ok +test isolates_its_strong_hands ... ok +test continues_with_about_two_thirds_of_all_hands ... ok +test more_limpers_do_not_narrow_the_completing_range ... ok +test the_practice_table_hands_of_5_november_complete ... ok + +test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 6 tests +test all_in_when_the_call_takes_the_stack ... ok +test bad_numbers_never_panic ... ok +test limped_pots ... ok +test re_raises ... ok +test single_raise ... ok +test unopened_pots ... ok + +test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 8 tests +test a_short_jam_over_an_open_counts_as_a_raise ... ok +test a_min_reraise_after_our_raise_is_a_three_bet ... ok +test a_single_min_raise_is_an_open_although_it_costs_one_big_blind ... ok +test facing_more_than_the_stack_stays_all_in ... ok +test limpers_without_a_raise_are_a_limped_pot ... ok +test only_the_blinds_is_unopened ... ok +test the_advice_names_the_three_bet ... ok +test without_history_the_chip_counts_decide ... ok + +test result: ok. 8 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 16 tests +test a_flop_pot_on_a_bucket_bound_belongs_to_the_next_bucket ... ok +test a_hand_that_ends_before_the_flop_pays_nothing ... ok +test a_pot_under_the_cap_pays_five_percent_antes_included ... ok +test a_pot_with_chips_behind_pays_what_such_pots_paid_at_the_table ... ok +test an_all_in_pays_the_exact_rule_on_the_pot ... ok +test an_empty_or_broken_pot_pays_nothing ... ok +test heads_up_pays_the_same_as_three_players ... ok +test more_than_three_players_use_their_own_cap_and_three_do_not ... ok +test no_rake_is_no_rake ... ok +test nothing_to_split_stays_empty_or_zero ... ok +test only_the_part_nobody_called_comes_back ... ok +test the_cap_holds_per_hand_and_is_shared_in_proportion_to_the_pots ... ok +test the_cap_starts_exactly_at_twenty_big_blinds ... ok +test the_cap_stops_the_rake ... ok +test the_measured_table_in_big_blinds_is_the_table_above ... ok +test the_postflop_rake_never_shrinks_with_the_pot_and_never_passes_the_cap ... ok + +test result: ok. 16 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 22 tests +test all_in_counts_as_a_raise ... ok +test a_raise_is_stricter_than_a_bet_on_every_street ... ok +test bet_and_call_on_one_street_keep_the_stricter_floor ... ok +test bet_followed_by_a_raise_on_the_same_street_counts_as_the_raise ... ok +test bigger_bets_are_stricter_and_smaller_ones_looser ... ok +test calling_a_big_bet_leaves_a_mild_floor ... ok +test calling_a_big_river_bet_wants_a_made_hand ... ok +test calling_a_small_or_unsized_bet_adds_nothing ... ok +test checks_and_calls_add_no_continuation ... ok +test every_street_the_villain_bet_gets_an_entry_sorted_by_board_length ... ok +test flop_bet_keeps_middle_pair_and_draws ... ok +test flop_raise_keeps_top_pair_good_kicker_and_draws ... ok +test later_streets_are_stricter_for_the_same_action ... ok +test later_streets_use_the_pot_built_so_far ... ok +test other_players_aggression_does_not_narrow_this_villain ... ok +test preflop_spot_has_no_continuations_even_with_later_records ... ok +test river_bet_and_raise_keep_only_made_hands ... ok +test size_effect_is_monotone ... ok +test streets_that_were_not_dealt_yet_are_dropped ... ok +test the_call_floor_is_always_looser_than_the_bet_floor ... ok +test turn_bet_and_raise ... ok +test unknown_bet_amount_or_unknown_pot_means_no_size_effect ... ok + +test result: ok. 22 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s + + +running 20 tests +test big_blind_check_is_wide_minus_the_strongest_raising_hands ... ok +test big_blind_that_stayed_in_against_a_raise_is_a_defender ... ok +test big_blind_with_no_action_after_limps_counts_as_checking ... ok +test caller_of_a_three_bet_is_narrower_than_a_caller_of_an_open ... ok +test cold_caller_from_early_position_is_tighter_than_from_the_button ... ok +test cold_caller_is_condensed_without_the_very_top_and_the_bottom ... ok +test empty_history_is_exactly_the_old_behaviour_for_every_villain ... ok +test four_bettor_is_narrower_than_a_three_bettor ... ok +test later_positions_open_wider ... ok +test limper_is_capped_in_the_middle ... ok +test no_records_for_this_villain_means_the_old_behaviour ... ok +test only_postflop_records_use_the_plain_vpip_band ... ok +test opener_band_is_the_opening_chart_of_its_position ... ok +test opener_who_calls_a_three_bet_is_capped ... ok +test opener_with_an_unknown_position_is_charted_as_middle ... ok +test other_seats_actions_do_not_change_this_villains_band ... ok +test preflop_all_in_is_a_narrow_top_band ... ok +test small_blind_completing_is_wide_without_the_raising_hands ... ok +test small_blind_that_only_posted_and_saw_no_raise_counts_as_completing ... ok +test three_bettor_has_a_narrow_top_band ... ok + +test result: ok. 20 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s + + +running 10 tests +test calling_station_loosens_and_nit_tightens_the_postflop_floor ... ok +test a_profile_without_numbers_is_neutral ... ok +test extreme_numbers_stay_well_formed ... ok +test higher_pfr_widens_an_opening_band ... ok +test looser_player_never_gets_a_higher_min_made ... ok +test looser_vpip_widens_a_calling_band ... ok +test looser_vpip_widens_a_limping_band ... ok +test low_fold_to_bet_alone_loosens ... ok +test no_profile_matches_the_regular_floor ... ok +test opening_without_pfr_falls_back_on_vpip_at_half_strength ... ok + +test result: ok. 10 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 7 tests +test board_and_street_that_disagree_stay_well_formed ... ok +test actions_out_of_order_stay_well_formed ... ok +test hero_and_duplicate_blinds_are_harmless ... ok +test nonsense_amounts_and_table_sizes_stay_well_formed ... ok +test property_spec_is_deterministic ... ok +test unknown_seats_are_ignored ... ok +test property_random_histories_always_give_a_well_formed_spec ... ok + +test result: ok. 7 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s + + +running 28 tests +test ace_high_end_draw_is_a_gutshot ... ok +test ace_low_draws_in_full_deck ... ok +test backdoor_flush_on_the_flop ... ok +test backdoor_only_exists_on_the_flop ... ok +test backdoor_straight_on_the_flop ... ok +test board_straight_draw_without_hero_cards_is_no_draw ... ok +test combo_flush_plus_pair ... ok +test combo_flush_plus_straight ... ok +test double_gutshot_counts_as_open_ended ... ok +test draw_order_is_weakest_first ... ok +test dry_hand_has_no_draw ... ok +test flush_draw ... ok +test flush_draw_with_one_hole_card_on_a_monotone_flop ... ok +test four_suited_board_cards_are_not_a_hero_draw ... ok +test gutshot ... ok +test holding_the_highest_missing_card_is_the_nut_draw ... ok +test made_straight_or_better_reports_no_draw ... ok +test no_draws_on_the_river ... ok +test non_nut_flush_draw_and_no_draw ... ok +test nut_draw_is_false_once_the_flush_is_made ... ok +test nut_flush_draw_holds_the_ace_of_the_suit ... ok +test open_ended_straight_draw ... ok +test plo5_flush_draw_needs_exactly_two_hole_cards_with_two_board_cards ... ok +test plo5_one_suited_hole_card_is_not_a_flush_draw ... ok +test plo5_straight_draw_needs_two_hole_ranks ... ok +test short_deck_ace_low_gutshot ... ok +test short_deck_flush_draw ... ok +test short_deck_wheel_window_supplies_the_second_end ... ok + +test result: ok. 28 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s + + +running 12 tests +test board_with_six_cards_is_invalid ... ok +test board_with_two_cards_is_invalid ... ok +test card_below_the_short_deck_is_invalid ... ok +test duplicate_between_hole_and_board_is_inconsistent ... ok +test duplicate_inside_hole_or_board_is_inconsistent ... ok +test empty_board_is_invalid ... ok +test holdem_hand_in_plo5_is_invalid ... ok +test holdem_with_one_or_three_hole_cards_is_invalid ... ok +test plo5_needs_exactly_five_hole_cards ... ok +test six_is_the_lowest_short_deck_card ... ok +test valid_inputs_pass_in_every_variant ... ok +test arbitrary_card_lists_never_panic ... ok + +test result: ok. 12 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s + + +running 4 tests +test glance_agrees_with_read_on_concrete_hands ... ok +test glance_is_cheap_enough_for_monte_carlo_loops ... ok +test read_invariants_over_random_hands ... ok +test glance_equals_made_and_draw_of_read_in_every_variant ... ok + +test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.04s + + +running 19 tests +test board_only_pair_trips_and_two_pair ... ok +test air_has_no_pair ... ok +test board_only_straight_and_flush ... ok +test classes_are_ordered_weakest_first ... ok +test hero_flush_card_above_the_board_flush_improves_it ... ok +test middle_and_bottom_pair_on_four_cards ... ok +test middle_and_bottom_pair_on_the_flop ... ok +test plo5_board_flush_is_not_playable_with_one_suited_hole_card ... ok +test plo5_board_straight_alone_is_not_a_straight_for_hero ... ok +test plo5_classifies_from_best_two_plus_three ... ok +test plo5_flush_needs_two_suited_hole_cards ... ok +test plo5_straight_uses_exactly_two_hole_cards ... ok +test pocket_pairs_against_the_board ... ok +test set_versus_trips ... ok +test short_deck_pair_classes_follow_the_same_rules ... ok +test straight_flush_full_house_quads ... ok +test top_pair_kicker_split_at_queen ... ok +test two_pair_must_use_a_hole_card ... ok +test wheel_straight_in_full_deck ... ok + +test result: ok. 19 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s + + +running 11 tests +test ein_einzelner_straight_nut_koerper_blockiert_die_nuss_nicht ... ok +test ass_zum_nut_flush_blockiert_die_nuss ... ok +test nicht_nut_flush_ist_nicht_die_nuss ... ok +test geteilte_nuss_zaehlt_als_nuss ... ok +test nut_straight_am_brett_qjt_ist_die_nuss ... ok +test nut_flush_ist_die_nuss ... ok +test ohne_den_nut_blocker_ist_die_nuss_nicht_blockiert ... ok +test second_nut_straight_ist_nicht_die_nuss ... ok +test set_unter_moeglichem_hoeherem_set_ist_nicht_die_nuss ... ok +test quad_nuss_und_second_nut_am_gepaarten_river ... ok +test ungueltige_eingabe_ist_keine_nuss_statt_panik ... ok + +test result: ok. 11 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s + + +running 15 tests +test board_completed_straight_is_not_an_out ... ok +test air_without_draw_has_no_outs ... ok +test double_gutshot_has_eight_outs ... ok +test flush_draw_has_five_outs_in_short_deck ... ok +test flush_draw_has_nine_outs_in_a_full_deck ... ok +test flush_plus_open_ender_has_fifteen_outs ... ok +test gutshot_has_four_outs ... ok +test made_flush_cannot_be_improved_by_a_plain_flush_card ... ok +test open_ended_straight_draw_has_eight_outs ... ok +test outs_never_exceed_the_unseen_cards ... ok +test river_has_no_outs ... ok +test plo5_nut_flush_draw_outs ... ok +test short_deck_open_ender_has_eight_outs_among_fewer_cards ... ok +test top_pair_good_kicker_has_five_outs ... ok +test underpair_has_two_outs_to_a_set ... ok + +test result: ok. 15 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 18 tests +test connected_is_wetter_than_disconnected ... ok +test broadway_board_has_five_connected_ranks ... ok +test connected_two_tone_jack_ten_nine ... ok +test connectivity_counts_ace_low_window_in_full_deck ... ok +test dry_ace_seven_deuce_rainbow ... ok +test empty_board_is_the_neutral_texture ... ok +test flush_texture_ordering ... ok +test four_flush_on_the_turn ... ok +test king_seven_deuce_is_completely_dry ... ok +test monotone_board ... ok +test paired_board_is_a_little_wetter_than_its_unpaired_twin ... ok +test pairing_levels ... ok +test short_deck_ace_low_window_is_ace_six_seven_eight_nine ... ok +test short_deck_full_wheel_board ... ok +test three_of_a_suit_on_four_cards_is_monotone ... ok +test two_tone_board ... ok +test two_two_suit_split_is_two_tone ... ok +test wetness_stays_in_unit_interval_on_extreme_boards ... ok + +test result: ok. 18 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s + + +running 6 tests +test edge_hands_get_edge_decisions ... ok +test every_all_in_decision_agrees_with_direct_card_showdowns ... ignored, full sweep, minutes in release: cargo test --release --test short_deck_charts -- --ignored --nocapture +test every_deck_class_has_a_row_in_every_reachable_node_and_nothing_else_does ... ok +test every_seat_and_depth_appears_exactly_once ... ok +test the_deck_edge_is_exact_sixes_are_dealt_fives_are_not ... ok +test all_in_decisions_agree_with_direct_card_showdowns_on_sample_spots ... ok + +test result: ok. 5 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out; finished in 6.66s + + +running 8 tests +test drawing_more_than_the_short_deck_holds_is_none ... ok +test short_deck_draws_never_contain_cards_below_six ... ok +test short_deck_has_36_cards_and_no_twos_to_fives ... ok +test short_deck_has_every_suit_of_every_rank_from_six_up_exactly_once ... ok +test the_full_rule_is_the_old_52_card_deck_in_the_same_order ... ok +test without_in_full_matches_without ... ok +test without_in_ignores_dead_cards_that_are_not_in_the_deck ... ok +test without_in_removes_dead_cards_from_the_rule_deck ... ok + +test result: ok. 8 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 13 tests +test ace_king_offsuit_against_jack_ten_suited ... ok +test ace_king_suited_against_queens ... ok +test burns_do_not_change_equity_because_burned_cards_are_unseen_random_cards ... ok +test cards_outside_the_short_deck_are_invalid_input ... ok +test exact_enumeration_on_a_four_card_board_is_a_hand_countable_value ... ok +test fourteen_two_card_players_fit_the_short_deck_fifteen_do_not ... ok +test holdem_results_are_bit_identical_to_before_for_the_same_seed ... ok +test known_hands_count_towards_the_short_deck_capacity ... ok +test short_deck_runs_are_reproducible_for_one_seed ... ok +test short_deck_samples_never_deal_a_card_below_six ... ok +test the_full_deck_capacity_is_unchanged ... ok +test aces_against_kings ... ok +test the_two_matchup_sides_add_up_to_one ... ok + +test result: ok. 13 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.61s + + +running 2 tests +test five_card_frequencies_match_the_published_table ... ok +test the_ranking_choice_changes_how_hands_compare_not_what_they_are ... ok + +test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.02s + + +running 9 tests +test a_board_card_below_six_is_rejected ... ok +test a_consistent_short_deck_spot_passes_unchanged ... ok +test a_hero_card_below_six_is_rejected_with_a_specific_fault ... ok +test folded_villains_do_not_count_against_the_deck ... ok +test ordinary_tables_are_untouched ... ok +test six_is_the_lowest_legal_rank ... ok +test the_capacity_check_also_holds_preflop ... ok +test the_same_cards_are_fine_in_a_full_deck_variant ... ok +test thirteen_live_villains_fit_fourteen_do_not ... ok + +test result: ok. 9 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 12 tests +test a_hand_from_the_full_deck_is_not_ranked_by_the_short_deck ... ok +test aces_are_the_best_hand_and_the_percentile_is_combo_weighted ... ok +test every_combo_gets_a_percentile_in_the_open_unit_interval_and_the_mean_is_one_half ... ok +test invalid_hands_are_one ... ok +test pairs_descend ... ok +test suited_beats_offsuit_and_higher_beats_lower_in_the_same_shape ... ok +test suits_inside_a_class_do_not_matter ... ok +test the_dispatch_follows_the_deck_not_the_variant_name ... ok +test the_ranking_has_81_distinct_classes ... ok +test the_ranking_names_only_ranks_from_six_up ... ok +test the_weakest_hands_are_low_unconnected_offsuit_cards ... ok +test there_are_630_combos ... ok + +test result: ok. 12 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 22 tests +test a_higher_flush_beats_a_lower_one_and_a_bigger_boat_beats_a_smaller_one ... ok +test a_ten_high_straight_flush_beats_the_ace_low_one ... ok +test ace_low_needs_all_four_cards_ace_six_seven_eight_ten_is_not_a_straight ... ok +test duplicates_are_still_inconsistent_in_short_deck ... ok +test equal_strength_means_a_split_pot ... ok +test judge_with_the_standard_rules_equals_best ... ok +test kicker_comparison_is_unchanged_by_the_short_deck ... ok +test omaha_rules_through_judge_are_unchanged ... ok +test r1_flush_beats_full_house_in_short_deck ... ok +test r1_full_house_still_beats_flush_with_standard_rules ... ok +test r2_ace_low_straight_is_a_nine_high_straight ... ok +test r2_ace_six_seven_eight_nine_is_no_straight_in_the_full_deck ... ok +test r2_the_full_deck_wheel_is_unchanged ... ok +test r3_a_wheel_cannot_exist_in_short_deck ... ok +test r4_six_to_ten_beats_ace_to_nine ... ok +test r5_a_straight_beats_three_of_a_kind ... ok +test short_deck_category_ladder_is_flush_over_full_house_and_otherwise_standard ... ok +test straight_flush_ace_to_nine_suited ... ok +test the_board_playing_splits_even_with_the_ace_low_straight ... ok +test the_broadway_straight_is_the_highest ... ok +test the_comparison_is_antisymmetric_and_transitive_over_a_ladder ... ok +test the_lowest_straight_flush_still_beats_four_of_a_kind ... ok + +test result: ok. 22 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s + + +running 1 test +test print_the_ranking ... ignored, offline generator: prints the ranking table + +test result: ok. 0 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 7 tests +test candidates_bounds_and_all_in_agree_with_nlhe ... ok +test a_raise_that_is_not_legal_is_never_returned ... ok +test enforcement_agrees_with_nlhe_for_every_kind_of_choice ... ok +test every_candidate_lies_inside_the_bounds_and_the_stack ... ok +test free_raises_are_clamped_to_min_max_and_stack ... ok +test raises_snap_to_allowed_sizes_verbatim ... ok +test the_rules_table_uses_no_limit_for_short_deck ... ok + +test result: ok. 7 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 23 tests +test a_bet_is_sized_from_the_pot_on_top_of_the_call ... ok +test a_clear_gain_is_better_a_clear_loss_is_worse ... ok +test a_damaged_file_is_refused ... ok +test a_loss_in_one_scenario_can_hide_in_the_total_but_not_in_the_report ... ok +test a_raise_is_never_offered_when_impossible ... ok +test an_invalid_request_counts_as_a_regression ... ok +test comparing_other_conditions_is_refused ... ok +test deal_samples_agree_with_the_measurement ... ok +test different_lengths_are_refused ... ok +test every_style_folds_air_to_a_pot_bet_and_raises_the_nuts ... ok +test noise_around_zero_stays_unclear ... ok +test only_identical_scenarios_are_identical_overall ... ok +test overall_of_independent_scenarios_adds_variances ... ok +test preflop_a_good_hand_opens_but_does_not_reraise ... ok +test a_reading_opponent_does_not_play_like_a_blind_one ... ok +test strength_ranks_hands_and_knows_the_nuts ... ok +test the_file_returns_every_value_bit_for_bit ... ok +test the_interval_decides_at_its_edge ... ok +test the_scenarios_have_unique_names_and_no_saturated_opponent ... ok +test the_styles_differ_where_they_should ... ok +test the_verdict_covers_all_scenarios_with_equal_weight ... ok +test unchanged_results_are_identical_not_merely_unclear ... ok +test reading_opponents_play_legal_hands_and_lose_chips_to_nobody ... ok + +test result: ok. 23 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.47s + + +running 7 tests +test diagnose_fish_memory_convergence ... ignored, Diagnose, --nocapture +test diagnose_nit_full_read_leak ... ignored, Diagnose, --nocapture +test memory_recaptures_the_read_prize ... ignored, spielt 3x1000 Austeilungen; auf Abruf: cargo test --release -- --ignored +test probe_flop_bluff_raise_trajectory ... ignored, Probe, --nocapture, nur mit promotetem Nit +test reading_the_calling_station_pays_and_never_costs ... ignored, spielt 2x1000 Austeilungen; auf Abruf: cargo test --release -- --ignored +test reading_the_fish_is_worth_a_clear_prize ... ignored, spielt 2x1000 Austeilungen; auf Abruf: cargo test --release -- --ignored +test the_ladder_carries_blind_and_memory_scenarios ... ok + +test result: ok. 1 passed; 0 failed; 6 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 1 test +test gegner_stats_messen ... ignored, Diagnose: cargo test --release --test sim_opponent_stats -- --ignored --nocapture + +test result: ok. 0 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 4 tests +test der_folder_ist_ein_nit_das_random_legal_ohne_read ... ok +test calling_station_und_fisch_sind_breit_schwach ... ok +test der_maniac_ist_loose_aggressiv_nicht_breit_schwach ... ok +test reg_ist_regular_nit_ist_nit ... ok + +test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 17 tests +test a_deal_has_distinct_cards ... ok +test a_hand_that_ends_before_the_flop_pays_antes_but_no_rake ... ok +test aces_against_a_calling_station_win_the_showdown ... ok +test calling_station_never_folds_never_raises ... ok +test a_showdown_pays_rake_and_the_chips_balance ... ok +test folder_folds_to_any_pressure_and_checks_otherwise ... ok +test folder_in_the_small_blind_gives_the_big_blind_away ... ok +test every_hand_conserves_chips_and_sends_only_valid_requests ... ok +test heads_up_the_folder_loses_almost_every_blind ... ok +test heads_up_the_calling_station_is_beaten_on_the_point_estimate ... ok +test long_run_heads_up_and_six_max ... ignored, langer Lauf: cargo test --release --test sim_strength -- --ignored --nocapture +test net_run_at_the_measured_table ... ignored, Netto-Lauf: cargo test --release --test sim_strength net_run -- --ignored --nocapture +test random_opponent_stays_legal_and_uses_every_option ... ok +test six_handed_random_hands_balance_with_the_rake_within_the_cap ... ok +test the_free_table_takes_nothing ... ok +test the_measurement_is_deterministic ... ok +test heads_up_the_random_opponent_is_beaten_beyond_the_interval ... ok + +test result: ok. 15 passed; 0 failed; 2 ignored; 0 measured; 0 filtered out; finished in 2.18s + + +running 14 tests +test all_in_is_stack_or_max ... ok +test all_in_only_offers_exactly_the_jam ... ok +test all_in_with_allowed_sizes_is_the_largest_affordable_one ... ok +test allowed_sizes_are_filtered_by_min_and_max ... ok +test allowed_sizes_are_the_only_source_verbatim ... ok +test allowed_sizes_win_for_every_variant ... ok +test fit_clamps_free_sizes_and_snaps_allowed_ones ... ok +test fit_on_binary_variants_is_the_jam ... ok +test menu_without_allowed_sizes_falls_back_to_free_sizes ... ok +test nolimit_fractions_are_measured_on_the_pot_after_calling ... ok +test nolimit_offers_a_few_pot_fractions_inside_bounds ... ok +test potlimit_never_exceeds_pot_sized_raise ... ok +test sizes_are_clamped_into_the_hero_stack ... ok +test stack_below_min_raise_offers_only_the_short_all_in ... ok + +test result: ok. 14 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 7 tests +test facing_a_raise_makes_it_three_times ... ok +test capped_below_min_raise_gives_nothing ... ok +test raise_size_is_clamped_to_the_bounds ... ok +test raise_size_picks_the_nearest_allowed_size_verbatim ... ok +test raise_size_uses_the_target_when_free ... ok +test unaffordable_min_raise_becomes_the_short_all_in ... ok +test unopened_pot_opens_two_and_a_half_big_blinds ... ok + +test result: ok. 7 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 5 tests +test fold_is_the_zero_line_and_call_carries_its_price ... ok +test a_call_the_rule_would_not_consider_is_still_priced ... ok +test preflop_has_no_evs_because_the_charts_have_none ... ok +test without_the_flag_the_answer_has_no_evs ... ok +test the_flag_changes_nothing_but_the_evs ... ok + +test result: ok. 5 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 19 tests +test board_streets_concatenate_in_deal_order ... ok +test aggression_trusts_its_own_sample ... ok +test card_errors_name_the_path ... ok +test card_forms ... ok +test decodes_the_contract_example ... ok +test decoding_does_not_check_consistency ... ok +test each_required_field_reports_missing ... ok +test empty_board_object_is_empty ... ok +test every_variant_street_and_action_name_decodes ... ok +test extension_fields ... ok +test hud_extra_fields ... ok +test hud_line_stats_rest_on_their_spots_not_on_all_hands ... ok +test null_optionals_are_absent ... ok +test optional_fields_default ... ok +test root_must_be_an_object ... ok +test street_reads_are_pulled_to_the_pooled_read ... ok +test unknown_fields_are_ignored ... ok +test villain_errors_name_the_path ... ok +test wrong_types_name_the_field ... ok + +test result: ok. 19 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s + + +running 8 tests +test contract_example ... ok +test confidence_is_rounded_to_three_decimals_and_in_range ... ok +test every_action_name ... ok +test key_order_is_fixed ... ok +test non_finite_size_becomes_null ... ok +test only_raise_has_a_size ... ok +test reason_is_escaped_and_single_line ... ok +test sizes_round_trip_exactly ... ok + +test result: ok. 8 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 6 tests +test garbage_input ... ok +test deeply_nested_input_does_not_overflow ... ok +test long_garbage_does_not_panic ... ok +test missing_field_is_named ... ok +test valid_json_of_wrong_shape ... ok +test wrong_types_are_named ... ok + +test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s + diff --git a/messung_perf/test_rot.txt b/messung_perf/test_rot.txt new file mode 100644 index 00000000..86209227 --- /dev/null +++ b/messung_perf/test_rot.txt @@ -0,0 +1,16 @@ +test a_defender_that_is_not_a_blind_now_reads_the_table ... FAILED +test a_full_table_opens_tighter_from_early_position ... FAILED +test a_second_defender_changes_the_button_open ... FAILED +test early_and_middle_open_narrower_with_two_defenders ... FAILED +test heads_up_small_blind_matches_published_push_fold_nash ... FAILED +test open_ranges_widen_with_position_as_subsets ... FAILED +test result: FAILED. 13 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 10.49s +test result: FAILED. 13 passed; 3 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s +test result: FAILED. 4 passed; 3 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s +test result: FAILED. 6 passed; 1 failed; 1 ignored; 0 measured; 0 filtered out; finished in 5.61s +test result: FAILED. 9 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.02s +test result: FAILED. 9 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 207.86s +test steal_wider_against_nits_in_the_blinds ... FAILED +test the_frozen_chart_file_is_exactly_what_the_generator_prints ... FAILED +test the_frozen_file_is_exactly_what_the_generator_prints ... FAILED +test the_table_reproduces_from_the_score_distribution ... FAILED diff --git a/messung_perf/z_probe5.txt b/messung_perf/z_probe5.txt new file mode 100644 index 00000000..e69de29b diff --git a/messung_perf/z_probe5.txt.err b/messung_perf/z_probe5.txt.err new file mode 100644 index 00000000..ef032d40 --- /dev/null +++ b/messung_perf/z_probe5.txt.err @@ -0,0 +1 @@ +perf_probe lbr [seed] diff --git a/messung_perf/z_probe6.txt b/messung_perf/z_probe6.txt new file mode 100644 index 00000000..3995758b --- /dev/null +++ b/messung_perf/z_probe6.txt @@ -0,0 +1,2 @@ +wert-sizer -56.15 bb/100 samples 300 hash 08b5d9609b0e7df7 +fingerprint 0000000000000000 calls 0 diff --git a/messung_perf/z_probe6.txt.err b/messung_perf/z_probe6.txt.err new file mode 100644 index 00000000..49c47496 --- /dev/null +++ b/messung_perf/z_probe6.txt.err @@ -0,0 +1 @@ +4.30 s, 0 engine calls, 4296.401 ms/call diff --git a/messung_perf/z_prof5z.txt b/messung_perf/z_prof5z.txt new file mode 100644 index 00000000..3995758b --- /dev/null +++ b/messung_perf/z_prof5z.txt @@ -0,0 +1,2 @@ +wert-sizer -56.15 bb/100 samples 300 hash 08b5d9609b0e7df7 +fingerprint 0000000000000000 calls 0 diff --git a/messung_perf/z_prof5z.txt.err b/messung_perf/z_prof5z.txt.err new file mode 100644 index 00000000..18c053cf --- /dev/null +++ b/messung_perf/z_prof5z.txt.err @@ -0,0 +1 @@ +6.75 s, 0 engine calls, 6746.548 ms/call diff --git a/messung_perf/zelle0.log b/messung_perf/zelle0.log new file mode 100644 index 00000000..2694def7 --- /dev/null +++ b/messung_perf/zelle0.log @@ -0,0 +1,3 @@ +reg k=0 +6.38 bb/100 +-131.93 +maniac k=0 +175.03 bb/100 +-172.88 +wert-sizer k=0 +75.28 bb/100 +-132.29 diff --git a/messung_perf/zelle0.log.err b/messung_perf/zelle0.log.err new file mode 100644 index 00000000..e69de29b diff --git a/messung_perf/zelle0/maniac.0.txt b/messung_perf/zelle0/maniac.0.txt new file mode 100644 index 00000000..c92ba22e --- /dev/null +++ b/messung_perf/zelle0/maniac.0.txt @@ -0,0 +1,200 @@ +-0.13497474747474736 +-0.0938762626262668 +8.258699494949493 +14.813030303030306 +42.327083333333334 +-0.44267676767676734 +-2.557474747474748 +-22.023421717171715 +1.1992382154882204 +-0.19241161616161628 +-3.5498484848484857 +10.2722095959596 +-1.6271212121212173 +26.171767676767676 +0.5837121212121218 +-0.15626262626262621 +7.705505050505046 +2.9425 +-0.01071969696969699 +-0.5367424242424241 +-0.1693181818181817 +-2.4096590909090905 +-36.582070707070706 +0.04806818181818073 +0 +-0.6118939393939393 +9.391186868686857 +0 +1.227045454545455 +-5.617121212121207 +-22.343985690235687 +-15.33439393939394 +0.2738762626262584 +0.5734427609427604 +0 +1.3473484848484851 +30.467676767676775 +-2.549301346801342 +0.4204545454545454 +-6.065517676767676 +-1.3142676767676769 +-0.058800505050504825 +1.8174747474747477 +-10.599797979797984 +-0.01496212121212126 +0.06255050505050502 +0.346893939393935 +44.02623737373738 +-0.24295454545454542 +11.044242424242425 +-0.7591919191919194 +-0.9484848484848487 +0.5468181818181821 +-2.619671717171717 +-0.696780303030303 +12.634785353535356 +-7.281313131313131 +-0.6571969696969696 +-1.6963636363636365 +2.0388888888888888 +-0.75 +-4.720681818181818 +0.46825757575757576 +0.3538131313131313 +-2.5315404040404044 +-1.6103787878787879 +0.5841666666666667 +2.2713636363636356 +1.3884090909090916 +-0.3436489898989874 +-0.4952146464646461 +0.07416666666666716 +10.992121212121212 +11.14542929292929 +0.6686111111111118 +0.304520202020202 +-3.115277777777778 +1.5078072390572363 +-1.9940656565656565 +-1.8454545454545457 +1.983585858585859 +39.88036616161616 +7.349309764309765 +-41.20146464646464 +-27.18693181818182 +1.3164393939393944 +-23.021296296296295 +17.069621212121213 +-0.0868181818181819 +-5.639987373737373 +-0.504343434343435 +15.019393939393936 +-10.950673400673388 +8.647727272727273 +1.384520202020202 +-1.937878787878788 +0.3358333333333333 +-1.5924873737373693 +-2.640618686868687 +-0.7787878787878788 +5.076565656565656 +0.4678030303030305 +-1.3969318181818182 +0 +0.4231565656565657 +-2.6300000000000003 +2.5116666666666667 +-1.4118181818181819 +-0.2908333333333333 +-0.675871212121212 +-0.75 +43.09782828282829 +-0.901300505050505 +0.07250000000000006 +39.57138888888888 +-5.971174242424241 +-1.6701136363636362 +38.8395202020202 +-0.6520075757575758 +-0.29015151515151516 +-0.27 +-0.7662457912457921 +1.190795454545455 +2.718901515151515 +1.0186363636363636 +16.034797979797986 +-0.8834595959595959 +0.41840909090909095 +22.689343434343435 +28.816010101010104 +-0.6281439393939395 +-40.33636363636363 +0.6417676767676767 +-4.25267676767677 +44.781830808080805 +0.01170454545454569 +5.754776936026941 +0.17707070707070705 +-0.9098484848484869 +-3.310416666666667 +2.2985479797979798 +0.0086489898989901 +-2.7420833333333334 +0.009987373737373906 +18.06679292929293 +-0.52890151515152 +47.967718855218855 +-2.510492424242424 +-13.794431818181817 +-0.19291666666666663 +-0.7235353535353534 +-3.3788383838383798 +48.75416666666667 +0.09265151515151515 +-4.58036616161616 +0.44565656565656564 +-0.9383964646464646 +-1.1251515151515148 +-0.46378787878787886 +5.0093434343434335 +-0.3179166666666666 +0.703914141414141 +2.81719696969697 +0.4762500000000003 +0.5783333333333334 +-1.9447979797979684 +-0.09375 +-0.3359090909090907 +0.8679545454545456 +-0.6774242424242424 +13.550265151515154 +0 +-0.49655303030303033 +0.5321969696969697 +-2.8623358585858583 +7.489541245791245 +0.2536910774410752 +-0.15333333333333332 +-2.0445833333333336 +0.00034090909091366584 +0 +-5.8902777777777775 +-1.9131818181818185 +-0.0012499999999999734 +10.545189393939397 +-0.14069444444444446 +1.0234217171717217 +-0.6160984848484847 +2.2406439393939395 +-0.024191919191921762 +-22.377020202020205 +0.600037878787879 +0.28368686868686865 +13.923926767676758 +-0.7930303030303031 +-2.830429292929293 +-0.04746212121212123 +0.2237499999999979 +0.9226136363636361 +-11.849318181818182 \ No newline at end of file diff --git a/messung_perf/zelle0/reg.0.txt b/messung_perf/zelle0/reg.0.txt new file mode 100644 index 00000000..0afff966 --- /dev/null +++ b/messung_perf/zelle0/reg.0.txt @@ -0,0 +1,200 @@ +0.75 +-0.2751893939393939 +0.7040151515151516 +-0.32166666666666655 +0.5438888888888911 +0.10833333333333339 +-1.6742929292929296 +-5.876515151515152 +-1.0479783950617279 +0.18465909090909083 +0.03136363636363643 +-4.834368686868682 +2.7617424242424287 +-0.30267676767676766 +-0.34261363636364095 +0.75 +27.50318181818181 +0.41833333333333345 +0.75 +0.75 +0.2946969696969697 +0.39666666666666667 +0.75 +27.605833333333337 +0.2675 +-0.023055555555553275 +0.6315867003367028 +0.36 +0.75 +-3.2663973063972955 +-24.80445286195286 +0.75 +0.75 +-0.3237373737373741 +0.5645707070707071 +2.619444444444442 +41.70016835016835 +0.2774663299663349 +1.6522727272727278 +-0.01041666666666674 +0.841540404040404 +0.75 +-0.052083333333332926 +0.75 +0.8746212121212121 +0.75 +-0.1325000000000005 +0.75 +0.2523484848484849 +-44.93303030303031 +0.75 +0.75 +0.75 +0.1469949494949495 +0.7264393939393987 +47.605303030303034 +-2.822474747474743 +-0.6571969696969696 +0.75 +0.29027777777777775 +-0.6729166666666666 +-0.21939393939393936 +0.75 +0.75 +0.75 +-0.27500000000000013 +-1.758333333333331 +0.75 +0.75 +0.24555555555555553 +-0.2907954545454544 +1.0116666666666667 +-0.4415151515151514 +0.7788636363636363 +-0.033333333333333104 +0.304520202020202 +-0.012499999999999956 +-0.1383207070707071 +0.22999999999999998 +0.75 +0.27005050505050504 +-12.345189393939394 +0.09102693602693812 +-29.29030303030303 +0.75 +0.4031818181818181 +-14.247748316498315 +0.2877272727272727 +0.75 +0.75 +-0.004166666666666652 +0.5832828282828284 +-19.736756453423112 +-4.326262626262623 +0.75 +0.75 +0.3358333333333333 +1.0121843434343436 +2.125555555555553 +1.6024621212121213 +1.2627272727272727 +0.75 +0.5608333333333333 +-5.987180134680138 +0.75 +-0.330833333333331 +0.75 +-0.1421212121212121 +0.75 +0.03125 +-0.6087752525252526 +-47.58521043771043 +0.5533333333333333 +0.46 +-2.5397222222222173 +0.4441287878787876 +-0.35481060606060355 +-4.289730639730639 +0.36833333333333335 +-0.2821969696969697 +-0.15416666666666667 +-0.6512626262626263 +0.3883333333333333 +0.245 +0.75 +8.691992143658819 +0.4 +0.75 +-1.6123316498316491 +-0.13060606060606028 +0.573939393939394 +0.07777777777778017 +1.4837121212121211 +0.19128787878787867 +0.9626893939393986 +0.4442424242424243 +-4.198253367003361 +0.75 +-0.6183712121212073 +-0.35208333333333375 +1.9083333333333332 +-0.2259469696969696 +2.920833333333338 +0.75 +-15.605681818181809 +2.9047348484848436 +-0.75 +-0.18222222222222217 +1.235631313131318 +-1.7687499999999976 +0.75 +1.604071268237941 +-0.24583333333333335 +0.24416666666666664 +0 +0.75 +0.75 +0.8315151515151565 +-0.6416666666666667 +-0.1589015151515154 +0.7133333333333334 +1.8945707070707116 +0.3516666666666667 +-44.54375 +0.75 +36.7932239057239 +0.28125 +-0.027083333333333126 +0.5497727272727273 +0.6733333333333333 +0.06108585858586091 +0.31666666666666665 +-0.6067550505050505 +0.75 +1.34231060606061 +-0.30248316498316263 +-0.44178030303030313 +-0.15333333333333332 +0.31583333333333335 +0.75 +45.270420875420875 +-0.022916666666666696 +0.31 +0.14416666666667144 +-0.10375000000000012 +-1.2770580808080785 +0.07916666666666661 +0.008333333333333304 +0.75 +0.75 +3.0584680134680147 +0.3998484848484849 +0.28368686868686865 +-0.024999999999992584 +0.75 +-0.15833333333333333 +0.20613636363636367 +0.9060563973064022 +0.966098484848485 +-0.02623737373737145 \ No newline at end of file diff --git a/messung_perf/zelle0/wert-sizer.0.txt b/messung_perf/zelle0/wert-sizer.0.txt new file mode 100644 index 00000000..3fe0f239 --- /dev/null +++ b/messung_perf/zelle0/wert-sizer.0.txt @@ -0,0 +1,100 @@ +-0.0854166666666667 +-11.895739289018472 +0.75 +0.75 +0.2841666666666667 +0.75 +0.6218644781144802 +-1.3099138427055736 +-0.23375 +0.75 +0.5541666666666667 +0.75 +0.35416666666666674 +0.75 +0.2658333333333333 +0.75 +0.75 +0.3734848484848483 +1.0171717171717172 +1.0929545454545455 +-0.44166666666666665 +0.75 +0.75 +0.41583333333333333 +-0.08499229774327888 +-0.3445075757575756 +0.75 +0.75 +2.1004040404040403 +-0.00833333333333286 +0.75 +1.6456439393939397 +-5.055002409180217 +0.75 +2.035524489336856 +0.2104166666666667 +-1.4360606060606085 +-7.1960546001863435 +0.42916666666666664 +0.75 +0.32481060606060574 +41.099187883082266 +0.75 +0.75 +0.28125 +0.029166666666666563 +0.75 +0.5007828282828284 +-3.060970143868707 +-0.054166666666666696 +2.0515907730188916 +0.49790404040404046 +-0.05196969696969722 +0.75 +-2.097714646464643 +0.6680555555555555 +0.75 +-0.2095454545454546 +-15.993342466439117 +0.75 +0.75 +0.21750000000000003 +0.75 +0.75 +0.6448232323232319 +0.1660479797979797 +0.22257575757575765 +-0.43169191919191907 +0.3333333333333333 +0.9390656565656565 +-0.017163299663297438 +-0.008333333333333304 +1.0874242424242424 +0.7698232323232324 +-0.5902272727272704 +-7.649590607587112 +-0.17290404040404028 +-0.4498106060606062 +0.5979166666666667 +0.2218181818181818 +0.75 +47.570075757575744 +0.5161363636363636 +0.75 +-3.438456662273872 +0.44871212121212123 +0.75 +0.5657070707070706 +1.742878787878788 +0.56 +-1.4093181818181841 +1.825378787878788 +0.11874999999999991 +0.15365898991804183 +0.75 +0.75 +0.75 +0.5233333333333333 +-0.32405303030303245 +0.75 \ No newline at end of file diff --git a/messung_perf/zelle5.log b/messung_perf/zelle5.log new file mode 100644 index 00000000..2694def7 --- /dev/null +++ b/messung_perf/zelle5.log @@ -0,0 +1,3 @@ +reg k=0 +6.38 bb/100 +-131.93 +maniac k=0 +175.03 bb/100 +-172.88 +wert-sizer k=0 +75.28 bb/100 +-132.29 diff --git a/messung_perf/zelle5.log.err b/messung_perf/zelle5.log.err new file mode 100644 index 00000000..e69de29b diff --git a/messung_perf/zelle5/maniac.0.txt b/messung_perf/zelle5/maniac.0.txt new file mode 100644 index 00000000..c92ba22e --- /dev/null +++ b/messung_perf/zelle5/maniac.0.txt @@ -0,0 +1,200 @@ +-0.13497474747474736 +-0.0938762626262668 +8.258699494949493 +14.813030303030306 +42.327083333333334 +-0.44267676767676734 +-2.557474747474748 +-22.023421717171715 +1.1992382154882204 +-0.19241161616161628 +-3.5498484848484857 +10.2722095959596 +-1.6271212121212173 +26.171767676767676 +0.5837121212121218 +-0.15626262626262621 +7.705505050505046 +2.9425 +-0.01071969696969699 +-0.5367424242424241 +-0.1693181818181817 +-2.4096590909090905 +-36.582070707070706 +0.04806818181818073 +0 +-0.6118939393939393 +9.391186868686857 +0 +1.227045454545455 +-5.617121212121207 +-22.343985690235687 +-15.33439393939394 +0.2738762626262584 +0.5734427609427604 +0 +1.3473484848484851 +30.467676767676775 +-2.549301346801342 +0.4204545454545454 +-6.065517676767676 +-1.3142676767676769 +-0.058800505050504825 +1.8174747474747477 +-10.599797979797984 +-0.01496212121212126 +0.06255050505050502 +0.346893939393935 +44.02623737373738 +-0.24295454545454542 +11.044242424242425 +-0.7591919191919194 +-0.9484848484848487 +0.5468181818181821 +-2.619671717171717 +-0.696780303030303 +12.634785353535356 +-7.281313131313131 +-0.6571969696969696 +-1.6963636363636365 +2.0388888888888888 +-0.75 +-4.720681818181818 +0.46825757575757576 +0.3538131313131313 +-2.5315404040404044 +-1.6103787878787879 +0.5841666666666667 +2.2713636363636356 +1.3884090909090916 +-0.3436489898989874 +-0.4952146464646461 +0.07416666666666716 +10.992121212121212 +11.14542929292929 +0.6686111111111118 +0.304520202020202 +-3.115277777777778 +1.5078072390572363 +-1.9940656565656565 +-1.8454545454545457 +1.983585858585859 +39.88036616161616 +7.349309764309765 +-41.20146464646464 +-27.18693181818182 +1.3164393939393944 +-23.021296296296295 +17.069621212121213 +-0.0868181818181819 +-5.639987373737373 +-0.504343434343435 +15.019393939393936 +-10.950673400673388 +8.647727272727273 +1.384520202020202 +-1.937878787878788 +0.3358333333333333 +-1.5924873737373693 +-2.640618686868687 +-0.7787878787878788 +5.076565656565656 +0.4678030303030305 +-1.3969318181818182 +0 +0.4231565656565657 +-2.6300000000000003 +2.5116666666666667 +-1.4118181818181819 +-0.2908333333333333 +-0.675871212121212 +-0.75 +43.09782828282829 +-0.901300505050505 +0.07250000000000006 +39.57138888888888 +-5.971174242424241 +-1.6701136363636362 +38.8395202020202 +-0.6520075757575758 +-0.29015151515151516 +-0.27 +-0.7662457912457921 +1.190795454545455 +2.718901515151515 +1.0186363636363636 +16.034797979797986 +-0.8834595959595959 +0.41840909090909095 +22.689343434343435 +28.816010101010104 +-0.6281439393939395 +-40.33636363636363 +0.6417676767676767 +-4.25267676767677 +44.781830808080805 +0.01170454545454569 +5.754776936026941 +0.17707070707070705 +-0.9098484848484869 +-3.310416666666667 +2.2985479797979798 +0.0086489898989901 +-2.7420833333333334 +0.009987373737373906 +18.06679292929293 +-0.52890151515152 +47.967718855218855 +-2.510492424242424 +-13.794431818181817 +-0.19291666666666663 +-0.7235353535353534 +-3.3788383838383798 +48.75416666666667 +0.09265151515151515 +-4.58036616161616 +0.44565656565656564 +-0.9383964646464646 +-1.1251515151515148 +-0.46378787878787886 +5.0093434343434335 +-0.3179166666666666 +0.703914141414141 +2.81719696969697 +0.4762500000000003 +0.5783333333333334 +-1.9447979797979684 +-0.09375 +-0.3359090909090907 +0.8679545454545456 +-0.6774242424242424 +13.550265151515154 +0 +-0.49655303030303033 +0.5321969696969697 +-2.8623358585858583 +7.489541245791245 +0.2536910774410752 +-0.15333333333333332 +-2.0445833333333336 +0.00034090909091366584 +0 +-5.8902777777777775 +-1.9131818181818185 +-0.0012499999999999734 +10.545189393939397 +-0.14069444444444446 +1.0234217171717217 +-0.6160984848484847 +2.2406439393939395 +-0.024191919191921762 +-22.377020202020205 +0.600037878787879 +0.28368686868686865 +13.923926767676758 +-0.7930303030303031 +-2.830429292929293 +-0.04746212121212123 +0.2237499999999979 +0.9226136363636361 +-11.849318181818182 \ No newline at end of file diff --git a/messung_perf/zelle5/reg.0.txt b/messung_perf/zelle5/reg.0.txt new file mode 100644 index 00000000..0afff966 --- /dev/null +++ b/messung_perf/zelle5/reg.0.txt @@ -0,0 +1,200 @@ +0.75 +-0.2751893939393939 +0.7040151515151516 +-0.32166666666666655 +0.5438888888888911 +0.10833333333333339 +-1.6742929292929296 +-5.876515151515152 +-1.0479783950617279 +0.18465909090909083 +0.03136363636363643 +-4.834368686868682 +2.7617424242424287 +-0.30267676767676766 +-0.34261363636364095 +0.75 +27.50318181818181 +0.41833333333333345 +0.75 +0.75 +0.2946969696969697 +0.39666666666666667 +0.75 +27.605833333333337 +0.2675 +-0.023055555555553275 +0.6315867003367028 +0.36 +0.75 +-3.2663973063972955 +-24.80445286195286 +0.75 +0.75 +-0.3237373737373741 +0.5645707070707071 +2.619444444444442 +41.70016835016835 +0.2774663299663349 +1.6522727272727278 +-0.01041666666666674 +0.841540404040404 +0.75 +-0.052083333333332926 +0.75 +0.8746212121212121 +0.75 +-0.1325000000000005 +0.75 +0.2523484848484849 +-44.93303030303031 +0.75 +0.75 +0.75 +0.1469949494949495 +0.7264393939393987 +47.605303030303034 +-2.822474747474743 +-0.6571969696969696 +0.75 +0.29027777777777775 +-0.6729166666666666 +-0.21939393939393936 +0.75 +0.75 +0.75 +-0.27500000000000013 +-1.758333333333331 +0.75 +0.75 +0.24555555555555553 +-0.2907954545454544 +1.0116666666666667 +-0.4415151515151514 +0.7788636363636363 +-0.033333333333333104 +0.304520202020202 +-0.012499999999999956 +-0.1383207070707071 +0.22999999999999998 +0.75 +0.27005050505050504 +-12.345189393939394 +0.09102693602693812 +-29.29030303030303 +0.75 +0.4031818181818181 +-14.247748316498315 +0.2877272727272727 +0.75 +0.75 +-0.004166666666666652 +0.5832828282828284 +-19.736756453423112 +-4.326262626262623 +0.75 +0.75 +0.3358333333333333 +1.0121843434343436 +2.125555555555553 +1.6024621212121213 +1.2627272727272727 +0.75 +0.5608333333333333 +-5.987180134680138 +0.75 +-0.330833333333331 +0.75 +-0.1421212121212121 +0.75 +0.03125 +-0.6087752525252526 +-47.58521043771043 +0.5533333333333333 +0.46 +-2.5397222222222173 +0.4441287878787876 +-0.35481060606060355 +-4.289730639730639 +0.36833333333333335 +-0.2821969696969697 +-0.15416666666666667 +-0.6512626262626263 +0.3883333333333333 +0.245 +0.75 +8.691992143658819 +0.4 +0.75 +-1.6123316498316491 +-0.13060606060606028 +0.573939393939394 +0.07777777777778017 +1.4837121212121211 +0.19128787878787867 +0.9626893939393986 +0.4442424242424243 +-4.198253367003361 +0.75 +-0.6183712121212073 +-0.35208333333333375 +1.9083333333333332 +-0.2259469696969696 +2.920833333333338 +0.75 +-15.605681818181809 +2.9047348484848436 +-0.75 +-0.18222222222222217 +1.235631313131318 +-1.7687499999999976 +0.75 +1.604071268237941 +-0.24583333333333335 +0.24416666666666664 +0 +0.75 +0.75 +0.8315151515151565 +-0.6416666666666667 +-0.1589015151515154 +0.7133333333333334 +1.8945707070707116 +0.3516666666666667 +-44.54375 +0.75 +36.7932239057239 +0.28125 +-0.027083333333333126 +0.5497727272727273 +0.6733333333333333 +0.06108585858586091 +0.31666666666666665 +-0.6067550505050505 +0.75 +1.34231060606061 +-0.30248316498316263 +-0.44178030303030313 +-0.15333333333333332 +0.31583333333333335 +0.75 +45.270420875420875 +-0.022916666666666696 +0.31 +0.14416666666667144 +-0.10375000000000012 +-1.2770580808080785 +0.07916666666666661 +0.008333333333333304 +0.75 +0.75 +3.0584680134680147 +0.3998484848484849 +0.28368686868686865 +-0.024999999999992584 +0.75 +-0.15833333333333333 +0.20613636363636367 +0.9060563973064022 +0.966098484848485 +-0.02623737373737145 \ No newline at end of file diff --git a/messung_perf/zelle5/wert-sizer.0.txt b/messung_perf/zelle5/wert-sizer.0.txt new file mode 100644 index 00000000..3fe0f239 --- /dev/null +++ b/messung_perf/zelle5/wert-sizer.0.txt @@ -0,0 +1,100 @@ +-0.0854166666666667 +-11.895739289018472 +0.75 +0.75 +0.2841666666666667 +0.75 +0.6218644781144802 +-1.3099138427055736 +-0.23375 +0.75 +0.5541666666666667 +0.75 +0.35416666666666674 +0.75 +0.2658333333333333 +0.75 +0.75 +0.3734848484848483 +1.0171717171717172 +1.0929545454545455 +-0.44166666666666665 +0.75 +0.75 +0.41583333333333333 +-0.08499229774327888 +-0.3445075757575756 +0.75 +0.75 +2.1004040404040403 +-0.00833333333333286 +0.75 +1.6456439393939397 +-5.055002409180217 +0.75 +2.035524489336856 +0.2104166666666667 +-1.4360606060606085 +-7.1960546001863435 +0.42916666666666664 +0.75 +0.32481060606060574 +41.099187883082266 +0.75 +0.75 +0.28125 +0.029166666666666563 +0.75 +0.5007828282828284 +-3.060970143868707 +-0.054166666666666696 +2.0515907730188916 +0.49790404040404046 +-0.05196969696969722 +0.75 +-2.097714646464643 +0.6680555555555555 +0.75 +-0.2095454545454546 +-15.993342466439117 +0.75 +0.75 +0.21750000000000003 +0.75 +0.75 +0.6448232323232319 +0.1660479797979797 +0.22257575757575765 +-0.43169191919191907 +0.3333333333333333 +0.9390656565656565 +-0.017163299663297438 +-0.008333333333333304 +1.0874242424242424 +0.7698232323232324 +-0.5902272727272704 +-7.649590607587112 +-0.17290404040404028 +-0.4498106060606062 +0.5979166666666667 +0.2218181818181818 +0.75 +47.570075757575744 +0.5161363636363636 +0.75 +-3.438456662273872 +0.44871212121212123 +0.75 +0.5657070707070706 +1.742878787878788 +0.56 +-1.4093181818181841 +1.825378787878788 +0.11874999999999991 +0.15365898991804183 +0.75 +0.75 +0.75 +0.5233333333333333 +-0.32405303030303245 +0.75 \ No newline at end of file diff --git a/messung_perf/zelle8.log b/messung_perf/zelle8.log new file mode 100644 index 00000000..2694def7 --- /dev/null +++ b/messung_perf/zelle8.log @@ -0,0 +1,3 @@ +reg k=0 +6.38 bb/100 +-131.93 +maniac k=0 +175.03 bb/100 +-172.88 +wert-sizer k=0 +75.28 bb/100 +-132.29 diff --git a/messung_perf/zelle8.log.err b/messung_perf/zelle8.log.err new file mode 100644 index 00000000..e69de29b diff --git a/messung_perf/zelle8/maniac.0.txt b/messung_perf/zelle8/maniac.0.txt new file mode 100644 index 00000000..c92ba22e --- /dev/null +++ b/messung_perf/zelle8/maniac.0.txt @@ -0,0 +1,200 @@ +-0.13497474747474736 +-0.0938762626262668 +8.258699494949493 +14.813030303030306 +42.327083333333334 +-0.44267676767676734 +-2.557474747474748 +-22.023421717171715 +1.1992382154882204 +-0.19241161616161628 +-3.5498484848484857 +10.2722095959596 +-1.6271212121212173 +26.171767676767676 +0.5837121212121218 +-0.15626262626262621 +7.705505050505046 +2.9425 +-0.01071969696969699 +-0.5367424242424241 +-0.1693181818181817 +-2.4096590909090905 +-36.582070707070706 +0.04806818181818073 +0 +-0.6118939393939393 +9.391186868686857 +0 +1.227045454545455 +-5.617121212121207 +-22.343985690235687 +-15.33439393939394 +0.2738762626262584 +0.5734427609427604 +0 +1.3473484848484851 +30.467676767676775 +-2.549301346801342 +0.4204545454545454 +-6.065517676767676 +-1.3142676767676769 +-0.058800505050504825 +1.8174747474747477 +-10.599797979797984 +-0.01496212121212126 +0.06255050505050502 +0.346893939393935 +44.02623737373738 +-0.24295454545454542 +11.044242424242425 +-0.7591919191919194 +-0.9484848484848487 +0.5468181818181821 +-2.619671717171717 +-0.696780303030303 +12.634785353535356 +-7.281313131313131 +-0.6571969696969696 +-1.6963636363636365 +2.0388888888888888 +-0.75 +-4.720681818181818 +0.46825757575757576 +0.3538131313131313 +-2.5315404040404044 +-1.6103787878787879 +0.5841666666666667 +2.2713636363636356 +1.3884090909090916 +-0.3436489898989874 +-0.4952146464646461 +0.07416666666666716 +10.992121212121212 +11.14542929292929 +0.6686111111111118 +0.304520202020202 +-3.115277777777778 +1.5078072390572363 +-1.9940656565656565 +-1.8454545454545457 +1.983585858585859 +39.88036616161616 +7.349309764309765 +-41.20146464646464 +-27.18693181818182 +1.3164393939393944 +-23.021296296296295 +17.069621212121213 +-0.0868181818181819 +-5.639987373737373 +-0.504343434343435 +15.019393939393936 +-10.950673400673388 +8.647727272727273 +1.384520202020202 +-1.937878787878788 +0.3358333333333333 +-1.5924873737373693 +-2.640618686868687 +-0.7787878787878788 +5.076565656565656 +0.4678030303030305 +-1.3969318181818182 +0 +0.4231565656565657 +-2.6300000000000003 +2.5116666666666667 +-1.4118181818181819 +-0.2908333333333333 +-0.675871212121212 +-0.75 +43.09782828282829 +-0.901300505050505 +0.07250000000000006 +39.57138888888888 +-5.971174242424241 +-1.6701136363636362 +38.8395202020202 +-0.6520075757575758 +-0.29015151515151516 +-0.27 +-0.7662457912457921 +1.190795454545455 +2.718901515151515 +1.0186363636363636 +16.034797979797986 +-0.8834595959595959 +0.41840909090909095 +22.689343434343435 +28.816010101010104 +-0.6281439393939395 +-40.33636363636363 +0.6417676767676767 +-4.25267676767677 +44.781830808080805 +0.01170454545454569 +5.754776936026941 +0.17707070707070705 +-0.9098484848484869 +-3.310416666666667 +2.2985479797979798 +0.0086489898989901 +-2.7420833333333334 +0.009987373737373906 +18.06679292929293 +-0.52890151515152 +47.967718855218855 +-2.510492424242424 +-13.794431818181817 +-0.19291666666666663 +-0.7235353535353534 +-3.3788383838383798 +48.75416666666667 +0.09265151515151515 +-4.58036616161616 +0.44565656565656564 +-0.9383964646464646 +-1.1251515151515148 +-0.46378787878787886 +5.0093434343434335 +-0.3179166666666666 +0.703914141414141 +2.81719696969697 +0.4762500000000003 +0.5783333333333334 +-1.9447979797979684 +-0.09375 +-0.3359090909090907 +0.8679545454545456 +-0.6774242424242424 +13.550265151515154 +0 +-0.49655303030303033 +0.5321969696969697 +-2.8623358585858583 +7.489541245791245 +0.2536910774410752 +-0.15333333333333332 +-2.0445833333333336 +0.00034090909091366584 +0 +-5.8902777777777775 +-1.9131818181818185 +-0.0012499999999999734 +10.545189393939397 +-0.14069444444444446 +1.0234217171717217 +-0.6160984848484847 +2.2406439393939395 +-0.024191919191921762 +-22.377020202020205 +0.600037878787879 +0.28368686868686865 +13.923926767676758 +-0.7930303030303031 +-2.830429292929293 +-0.04746212121212123 +0.2237499999999979 +0.9226136363636361 +-11.849318181818182 \ No newline at end of file diff --git a/messung_perf/zelle8/reg.0.txt b/messung_perf/zelle8/reg.0.txt new file mode 100644 index 00000000..0afff966 --- /dev/null +++ b/messung_perf/zelle8/reg.0.txt @@ -0,0 +1,200 @@ +0.75 +-0.2751893939393939 +0.7040151515151516 +-0.32166666666666655 +0.5438888888888911 +0.10833333333333339 +-1.6742929292929296 +-5.876515151515152 +-1.0479783950617279 +0.18465909090909083 +0.03136363636363643 +-4.834368686868682 +2.7617424242424287 +-0.30267676767676766 +-0.34261363636364095 +0.75 +27.50318181818181 +0.41833333333333345 +0.75 +0.75 +0.2946969696969697 +0.39666666666666667 +0.75 +27.605833333333337 +0.2675 +-0.023055555555553275 +0.6315867003367028 +0.36 +0.75 +-3.2663973063972955 +-24.80445286195286 +0.75 +0.75 +-0.3237373737373741 +0.5645707070707071 +2.619444444444442 +41.70016835016835 +0.2774663299663349 +1.6522727272727278 +-0.01041666666666674 +0.841540404040404 +0.75 +-0.052083333333332926 +0.75 +0.8746212121212121 +0.75 +-0.1325000000000005 +0.75 +0.2523484848484849 +-44.93303030303031 +0.75 +0.75 +0.75 +0.1469949494949495 +0.7264393939393987 +47.605303030303034 +-2.822474747474743 +-0.6571969696969696 +0.75 +0.29027777777777775 +-0.6729166666666666 +-0.21939393939393936 +0.75 +0.75 +0.75 +-0.27500000000000013 +-1.758333333333331 +0.75 +0.75 +0.24555555555555553 +-0.2907954545454544 +1.0116666666666667 +-0.4415151515151514 +0.7788636363636363 +-0.033333333333333104 +0.304520202020202 +-0.012499999999999956 +-0.1383207070707071 +0.22999999999999998 +0.75 +0.27005050505050504 +-12.345189393939394 +0.09102693602693812 +-29.29030303030303 +0.75 +0.4031818181818181 +-14.247748316498315 +0.2877272727272727 +0.75 +0.75 +-0.004166666666666652 +0.5832828282828284 +-19.736756453423112 +-4.326262626262623 +0.75 +0.75 +0.3358333333333333 +1.0121843434343436 +2.125555555555553 +1.6024621212121213 +1.2627272727272727 +0.75 +0.5608333333333333 +-5.987180134680138 +0.75 +-0.330833333333331 +0.75 +-0.1421212121212121 +0.75 +0.03125 +-0.6087752525252526 +-47.58521043771043 +0.5533333333333333 +0.46 +-2.5397222222222173 +0.4441287878787876 +-0.35481060606060355 +-4.289730639730639 +0.36833333333333335 +-0.2821969696969697 +-0.15416666666666667 +-0.6512626262626263 +0.3883333333333333 +0.245 +0.75 +8.691992143658819 +0.4 +0.75 +-1.6123316498316491 +-0.13060606060606028 +0.573939393939394 +0.07777777777778017 +1.4837121212121211 +0.19128787878787867 +0.9626893939393986 +0.4442424242424243 +-4.198253367003361 +0.75 +-0.6183712121212073 +-0.35208333333333375 +1.9083333333333332 +-0.2259469696969696 +2.920833333333338 +0.75 +-15.605681818181809 +2.9047348484848436 +-0.75 +-0.18222222222222217 +1.235631313131318 +-1.7687499999999976 +0.75 +1.604071268237941 +-0.24583333333333335 +0.24416666666666664 +0 +0.75 +0.75 +0.8315151515151565 +-0.6416666666666667 +-0.1589015151515154 +0.7133333333333334 +1.8945707070707116 +0.3516666666666667 +-44.54375 +0.75 +36.7932239057239 +0.28125 +-0.027083333333333126 +0.5497727272727273 +0.6733333333333333 +0.06108585858586091 +0.31666666666666665 +-0.6067550505050505 +0.75 +1.34231060606061 +-0.30248316498316263 +-0.44178030303030313 +-0.15333333333333332 +0.31583333333333335 +0.75 +45.270420875420875 +-0.022916666666666696 +0.31 +0.14416666666667144 +-0.10375000000000012 +-1.2770580808080785 +0.07916666666666661 +0.008333333333333304 +0.75 +0.75 +3.0584680134680147 +0.3998484848484849 +0.28368686868686865 +-0.024999999999992584 +0.75 +-0.15833333333333333 +0.20613636363636367 +0.9060563973064022 +0.966098484848485 +-0.02623737373737145 \ No newline at end of file diff --git a/messung_perf/zelle8/wert-sizer.0.txt b/messung_perf/zelle8/wert-sizer.0.txt new file mode 100644 index 00000000..3fe0f239 --- /dev/null +++ b/messung_perf/zelle8/wert-sizer.0.txt @@ -0,0 +1,100 @@ +-0.0854166666666667 +-11.895739289018472 +0.75 +0.75 +0.2841666666666667 +0.75 +0.6218644781144802 +-1.3099138427055736 +-0.23375 +0.75 +0.5541666666666667 +0.75 +0.35416666666666674 +0.75 +0.2658333333333333 +0.75 +0.75 +0.3734848484848483 +1.0171717171717172 +1.0929545454545455 +-0.44166666666666665 +0.75 +0.75 +0.41583333333333333 +-0.08499229774327888 +-0.3445075757575756 +0.75 +0.75 +2.1004040404040403 +-0.00833333333333286 +0.75 +1.6456439393939397 +-5.055002409180217 +0.75 +2.035524489336856 +0.2104166666666667 +-1.4360606060606085 +-7.1960546001863435 +0.42916666666666664 +0.75 +0.32481060606060574 +41.099187883082266 +0.75 +0.75 +0.28125 +0.029166666666666563 +0.75 +0.5007828282828284 +-3.060970143868707 +-0.054166666666666696 +2.0515907730188916 +0.49790404040404046 +-0.05196969696969722 +0.75 +-2.097714646464643 +0.6680555555555555 +0.75 +-0.2095454545454546 +-15.993342466439117 +0.75 +0.75 +0.21750000000000003 +0.75 +0.75 +0.6448232323232319 +0.1660479797979797 +0.22257575757575765 +-0.43169191919191907 +0.3333333333333333 +0.9390656565656565 +-0.017163299663297438 +-0.008333333333333304 +1.0874242424242424 +0.7698232323232324 +-0.5902272727272704 +-7.649590607587112 +-0.17290404040404028 +-0.4498106060606062 +0.5979166666666667 +0.2218181818181818 +0.75 +47.570075757575744 +0.5161363636363636 +0.75 +-3.438456662273872 +0.44871212121212123 +0.75 +0.5657070707070706 +1.742878787878788 +0.56 +-1.4093181818181841 +1.825378787878788 +0.11874999999999991 +0.15365898991804183 +0.75 +0.75 +0.75 +0.5233333333333333 +-0.32405303030303245 +0.75 \ No newline at end of file diff --git a/src/bin/perf_probe/main.rs b/src/bin/perf_probe/main.rs new file mode 100644 index 00000000..9fb0c189 --- /dev/null +++ b/src/bin/perf_probe/main.rs @@ -0,0 +1,205 @@ +//! Performance probe (measurement tool, plan: hard performance work): plays LBR hands against the live +//! engine exactly as `engine_lbr` does, and hashes EVERY engine answer (each row the opponent +//! gives LBR) into one FNV-1a fingerprint. Two builds are bit-identical on this probe iff value +//! lines AND fingerprint match - a much finer check than the hand results alone. +//! +//! Run: `perf_probe lbr [seed=7]` (hands `from..to`, one thread) +//! `perf_probe decide [seed=7]` (n random engine spots on S1 nodes, decide only) +//! `PERF_PROFIL=`: sample the run (see `sampler.rs`). `PERF_DUMP=`: every answer as a line. +//! Wall times in a decision's reason ("... in 812 ms") are masked before hashing. +//! `PERF_MAX_CALLS=`: stop after `n` engine calls (fingerprint, latency, profile as at the end), for +//! slow arms where a whole hand takes too long. +//! Env arms as in `engine_lbr` (`TURN_SPIEL=grund` with `GRUNDSTRATEGIE`). + +mod sampler; + +use rechner::blueprint::abstraktion::river_cuts; +use rechner::blueprint::engine_gegner::EngineGegner; +use rechner::blueprint::lbr::{lbr_hand, Gegner}; +use rechner::blueprint::s1::{Abstraktion, S1}; +use std::sync::atomic::{AtomicU64, Ordering}; + +struct Spur<'a> { + g: &'a EngineGegner, + hash: AtomicU64, + n: AtomicU64, + dump: Option>, + /// Wall ms per call: (street by board cards, path from the reason, first call at this node+board?, ms). + zeiten: std::sync::Mutex>, + gesehen: std::sync::Mutex>, +} + +/// The decision's path: the solver name from the reason, else `heuristik`. +fn pfad(reason: &str) -> String { + for (stich, name) in [("turn game", "turn-solver"), ("river", "river-solver"), ("flop", "flop-solver")] { + if reason.contains(stich) && (reason.contains("solve") || reason.contains("game")) { + return name.to_string(); + } + } + "heuristik".to_string() +} + +fn quantil(v: &mut [f64], q: f64) -> f64 { + v.sort_by(|a, b| a.partial_cmp(b).unwrap()); + v[((v.len() as f64 - 1.0) * q).round() as usize] +} + +/// `text` with every number directly before " ms" replaced by `#`. +fn ohne_millis(text: &str) -> String { + let mut out = String::with_capacity(text.len()); + let b = text.as_bytes(); + let mut i = 0; + while i < b.len() { + if b[i].is_ascii_digit() { + let mut j = i; + while j < b.len() && (b[j].is_ascii_digit() || b[j] == b'.') { + j += 1; + } + if text[j..].starts_with(" ms") { + out.push('#'); + } else { + out.push_str(&text[i..j]); + } + i = j; + } else { + let c = text[i..].chars().next().unwrap(); + out.push(c); + i += c.len_utf8(); + } + } + out +} + +impl Gegner for Spur<'_> { + fn zeile(&self, s: &S1, k: usize, hand: u64, board: u64, klasse: usize) -> Vec { + let _ = klasse; + let t = std::time::Instant::now(); + let (r, d) = self.g.zeile_und_entscheidung(s, k, hand, board); + let ms = t.elapsed().as_secs_f64() * 1e3; + let erst = self.gesehen.lock().unwrap().insert((k, board)); + let grund = d.as_ref().map(|d| d.reason.clone()).unwrap_or_default(); + self.zeiten.lock().unwrap().push((board.count_ones(), pfad(&grund), erst, ms)); + // The full decision (choice, confidence, reason, equity, every line's EV) as text: any change + // in any float the engine computes on the way shows here. + // Wall times in a reason ("solved in 812 ms") are not part of the answer: masked. + let text = ohne_millis(&format!("{d:?}")); + if let Some(f) = &self.dump { + use std::io::Write; + writeln!(f.lock().unwrap(), "{k} {hand:x} {board:x} {r:?} {text}").unwrap(); + } + // Order-independent combination (wrapping sum of per-call hashes) so caching or reordering of calls + // inside a hand does not change the fingerprint, only the answers do. + let mut h: u64 = 0xcbf2_9ce4_8422_2325; + for x in [k as u64, hand, board].into_iter().chain(r.iter().map(|v| v.to_bits())) { + for b in x.to_le_bytes() { + h ^= b as u64; + h = h.wrapping_mul(0x0100_0000_01b3); + } + } + for b in text.bytes() { + h ^= b as u64; + h = h.wrapping_mul(0x0100_0000_01b3); + } + self.hash.fetch_add(h, Ordering::Relaxed); + let n = self.n.fetch_add(1, Ordering::Relaxed) + 1; + if std::env::var("PERF_MAX_CALLS").ok().and_then(|x| x.parse::().ok()) == Some(n) { + abschluss(self); + std::process::exit(0); + } + r + } +} + +static T0: std::sync::OnceLock = std::sync::OnceLock::new(); +static SAMPLER: std::sync::Mutex>> = std::sync::Mutex::new(None); + +/// Fingerprint, latency table and profile of the run so far. +fn abschluss(spur: &Spur) { + let dt = T0.get().unwrap().elapsed().as_secs_f64(); + println!("fingerprint {:016x} calls {}", spur.hash.load(Ordering::Relaxed), spur.n.load(Ordering::Relaxed)); + eprintln!("{dt:.2} s, {} engine calls, {:.3} ms/call", spur.n.load(Ordering::Relaxed), 1e3 * dt / spur.n.load(Ordering::Relaxed).max(1) as f64); + // Latency per decision: `live` = the first call at a node and board (cold for that public state, as + // the live client asks once per decision); `alle` = every call (LBR asks once per combo). + let z = spur.zeiten.lock().unwrap(); + let mut gruppen: std::collections::BTreeMap<(u32, String, &str), Vec> = Default::default(); + for (karten, p, erst, ms) in z.iter() { + gruppen.entry((*karten, p.clone(), "alle")).or_default().push(*ms); + if *erst { + gruppen.entry((*karten, p.clone(), "live")).or_default().push(*ms); + } + } + for ((karten, p, art), mut v) in gruppen { + let n = v.len(); + let (p50, p99, max) = (quantil(&mut v, 0.5), quantil(&mut v, 0.99), quantil(&mut v, 1.0)); + eprintln!("zeit board={karten} {p} {art}: n {n} p50 {p50:.2} ms p99 {p99:.2} ms max {max:.2} ms"); + } + if let (Ok(f), Some(t)) = (std::env::var("PERF_PROFIL"), SAMPLER.lock().unwrap().take()) { + sampler::ende(t, &f); + } +} + +fn main() { + let a: Vec = std::env::args().collect(); + if std::env::var("TURN_SPIEL").as_deref() == Ok("grund") { + rechner::engine::turn_game::set_turn_player(rechner::engine::turn_game::TurnPlayer::Grund); + assert!(rechner::blueprint::ranges::grundstrategie().is_some(), "TURN_SPIEL=grund needs GRUNDSTRATEGIE"); + } + let profil = std::env::var("PERF_PROFIL").ok(); + let s = S1::neu(Abstraktion { flop: None, turn: None, river: river_cuts(50, 1) }); + // LBR_PROFIL as in `engine_lbr`: the engine holds this read on its LBR opponent. + let g = match std::env::var("LBR_PROFIL") { + Ok(p) if !p.trim().is_empty() => EngineGegner::mit_profil(&p).expect("LBR_PROFIL: wire profile"), + _ => EngineGegner::default(), + }; + let dump = std::env::var("PERF_DUMP").ok().map(|f| std::sync::Mutex::new(std::fs::File::create(f).expect("dump file"))); + let spur = Spur { g: &g, hash: AtomicU64::new(0), n: AtomicU64::new(0), dump, zeiten: Default::default(), gesehen: Default::default() }; + sampler::anmelden(); + *SAMPLER.lock().unwrap() = profil.as_ref().map(|_| sampler::start()); + T0.set(std::time::Instant::now()).unwrap(); + match a.get(1).map(String::as_str) { + Some("lbr") => { + let von: u64 = a[2].parse().unwrap(); + let bis: u64 = a[3].parse().unwrap(); + let seed: u64 = a.get(4).map(|x| x.parse().unwrap()).unwrap_or(7); + for i in von..bis { + let v = lbr_hand(&s, &spur, i, seed, None); + println!("{i} {v}"); + } + } + Some("zelle") => { + // One ladder cell as `ab_zelle` plays it (same seeds), k = 0: classic rows and world rows. + use rechner::rng::Rng; + use rechner::sim::opponent::Opponent; + use rechner::sim::reader::Style; + use rechner::sim::session::{deal_samples_memory, ReadMode, Setup}; + use rechner::sim::welt::{Persona, ARCHETYPES}; + let name = a[2].as_str(); + let deals: u32 = a[3].parse().unwrap(); + let (opponent, seed) = match name { + "station" => (Opponent::CallingStation, 0x5EED_0001u64), + "reg" => (Opponent::Reader(Style::Reg), 0x5EED_0001), + "maniac" => (Opponent::Reader(Style::Maniac), 0x5EED_0001), + _ => { + let i = ARCHETYPES.iter().position(|x| *x == name).expect("row"); + (Opponent::Welt(Persona::draw(i, Rng::seeded(0xD2A9_0000 + 1000 * i as u64)).0), 0x5EED_0A11 ^ 0x9E37_79B9) + } + }; + let setup = Setup { players: 2, opponent, deals, stack_bb: 100.0, seed, read: ReadMode::Memory }; + let (samples, m, _) = deal_samples_memory(&setup); + let mut h: u64 = 0xcbf2_9ce4_8422_2325; + for x in &samples { + for b in x.to_bits().to_le_bytes() { + h ^= b as u64; + h = h.wrapping_mul(0x0100_0000_01b3); + } + } + println!("{name} {:+.2} bb/100 samples {} hash {h:016x}", m.bb_per_100, samples.len()); + } + _ => { + eprintln!("perf_probe lbr [seed] | zelle "); + std::process::exit(2); + } + } + let _ = profil; + abschluss(&spur); +} diff --git a/src/bin/perf_probe/sampler.rs b/src/bin/perf_probe/sampler.rs new file mode 100644 index 00000000..a54f6f03 --- /dev/null +++ b/src/bin/perf_probe/sampler.rs @@ -0,0 +1,130 @@ +//! In-process sampling profiler for Windows x64, no dependencies (measurement tool only, never in the +//! live `rechner`). A sampler thread suspends every registered thread every ~1 ms, unwinds its stack +//! with `RtlVirtualUnwind` (the .pdata LLVM emits), resumes it, and keeps the return addresses as +//! offsets from the module base. `ende` writes one line per sample (hex offsets, innermost first); +//! `werkzeuge/perf_symbole.py` resolves them with mingw `addr2line -i`. +//! +//! Nothing is allocated while a thread is suspended (it may hold the heap lock). + +#![allow(non_snake_case, clippy::upper_case_acronyms)] + +use std::ffi::c_void; +use std::sync::atomic::{AtomicBool, Ordering}; +use std::sync::Mutex; + +type HANDLE = *mut c_void; + +#[repr(C, align(16))] +struct Ctx([u8; 1232]); + +const CONTEXT_FULL: u32 = 0x0010_000B; +const OFF_FLAGS: usize = 0x30; +const OFF_RSP: usize = 0x98; +const OFF_RIP: usize = 0xF8; +const TIEFE: usize = 96; + +#[link(name = "kernel32")] +extern "system" { + fn GetCurrentThread() -> HANDLE; + fn GetCurrentProcess() -> HANDLE; + fn DuplicateHandle(sp: HANDLE, s: HANDLE, tp: HANDLE, t: *mut HANDLE, acc: u32, inh: i32, opt: u32) -> i32; + fn SuspendThread(h: HANDLE) -> u32; + fn ResumeThread(h: HANDLE) -> u32; + fn GetThreadContext(h: HANDLE, c: *mut Ctx) -> i32; + fn RtlLookupFunctionEntry(pc: u64, base: *mut u64, hist: *mut c_void) -> *mut c_void; + fn RtlVirtualUnwind(typ: u32, base: u64, pc: u64, fe: *mut c_void, ctx: *mut Ctx, hd: *mut *mut c_void, est: *mut u64, ptrs: *mut c_void) -> *mut c_void; + fn GetModuleHandleW(n: *const u16) -> HANDLE; +} + +struct Faden(HANDLE); +unsafe impl Send for Faden {} + +static FAEDEN: Mutex> = Mutex::new(Vec::new()); +static AN: AtomicBool = AtomicBool::new(false); +static PROBEN: Mutex>> = Mutex::new(Vec::new()); + +/// Register the calling thread for sampling. +pub fn anmelden() { + let mut h: HANDLE = std::ptr::null_mut(); + unsafe { + DuplicateHandle(GetCurrentProcess(), GetCurrentThread(), GetCurrentProcess(), &mut h, 0, 0, 2); + } + FAEDEN.lock().unwrap().push(Faden(h)); +} + +fn get(c: &Ctx, off: usize) -> u64 { + u64::from_le_bytes(c.0[off..off + 8].try_into().unwrap()) +} +fn set(c: &mut Ctx, off: usize, v: u64) { + c.0[off..off + 8].copy_from_slice(&v.to_le_bytes()); +} + +/// Start the sampler thread. +pub fn start() -> std::thread::JoinHandle<()> { + AN.store(true, Ordering::SeqCst); + std::thread::spawn(|| { + let basis = unsafe { GetModuleHandleW(std::ptr::null()) } as u64; + let mut ctx = Box::new(Ctx([0; 1232])); + let mut puffer = [0u64; TIEFE]; + while AN.load(Ordering::SeqCst) { + std::thread::sleep(std::time::Duration::from_millis(1)); + let handles: Vec = FAEDEN.lock().unwrap().iter().map(|f| f.0 as usize).collect(); + for h in handles { + let h = h as HANDLE; + let mut n = 0; + unsafe { + if SuspendThread(h) == u32::MAX { + continue; + } + ctx.0.fill(0); + ctx.0[OFF_FLAGS..OFF_FLAGS + 4].copy_from_slice(&CONTEXT_FULL.to_le_bytes()); + if GetThreadContext(h, &mut *ctx) != 0 { + while n < TIEFE { + let pc = get(&ctx, OFF_RIP); + if pc == 0 { + break; + } + puffer[n] = pc; + n += 1; + let mut img = 0u64; + let fe = RtlLookupFunctionEntry(pc, &mut img, std::ptr::null_mut()); + if fe.is_null() { + let rsp = get(&ctx, OFF_RSP); + if rsp == 0 { + break; + } + set(&mut ctx, OFF_RIP, *(rsp as *const u64)); + set(&mut ctx, OFF_RSP, rsp + 8); + } else { + let mut hd: *mut c_void = std::ptr::null_mut(); + let mut est = 0u64; + RtlVirtualUnwind(0, img, pc, fe, &mut *ctx, &mut hd, &mut est, std::ptr::null_mut()); + } + } + } + ResumeThread(h); + } + if n > 0 { + // Innermost pc as is, return addresses minus one (inside the call instruction). + let s: Vec = puffer[..n].iter().enumerate().map(|(i, p)| p.wrapping_sub(basis).wrapping_sub((i > 0) as u64)).collect(); + PROBEN.lock().unwrap().push(s); + } + } + } + }) +} + +/// Stop sampling and write the samples to `datei`. +pub fn ende(t: std::thread::JoinHandle<()>, datei: &str) { + AN.store(false, Ordering::SeqCst); + t.join().unwrap(); + let p = PROBEN.lock().unwrap(); + let mut s = String::new(); + for z in p.iter() { + let w: Vec = z.iter().map(|x| format!("{x:x}")).collect(); + s.push_str(&w.join(" ")); + s.push('\n'); + } + std::fs::write(datei, s).expect("profile file"); + eprintln!("{} samples -> {datei}", p.len()); +} diff --git a/src/blueprint/engine_gegner.rs b/src/blueprint/engine_gegner.rs index 77240e86..bddb39ef 100644 --- a/src/blueprint/engine_gegner.rs +++ b/src/blueprint/engine_gegner.rs @@ -185,14 +185,27 @@ impl EngineGegner { } } -impl Gegner for EngineGegner { - fn zeile(&self, s: &S1, k: usize, hand: u64, board: u64, _: usize) -> Vec { - let Knoten::Zug { kinder, .. } = &s.baum.baum.knoten[k] else { return Vec::new() }; +impl EngineGegner { + /// The row of `Gegner::zeile` and the engine's full decision behind it (`None` off the tree). + pub fn zeile_und_entscheidung(&self, s: &S1, k: usize, hand: u64, board: u64) -> (Vec, Option) { + let Knoten::Zug { kinder, .. } = &s.baum.baum.knoten[k] else { return (Vec::new(), None) }; let mut row = vec![0.0; kinder.len()]; - let pick = self.spot(s, k, hand, board).and_then(|(spot, start)| self.kind(s, k, decide(&spot).choice, start)); + let mut d = None; + let pick = self.spot(s, k, hand, board).and_then(|(spot, start)| { + let e = decide(&spot); + let c = self.kind(s, k, e.choice, start); + d = Some(e); + c + }); let i = pick.and_then(|c| kinder.iter().position(|x| *x == c)).unwrap_or(0); row[i] = 1.0; - row + (row, d) + } +} + +impl Gegner for EngineGegner { + fn zeile(&self, s: &S1, k: usize, hand: u64, board: u64, _: usize) -> Vec { + self.zeile_und_entscheidung(s, k, hand, board).0 } } diff --git a/src/cfr/turn_river_game.rs b/src/cfr/turn_river_game.rs index ad29a97b..6c3a1b1d 100644 --- a/src/cfr/turn_river_game.rs +++ b/src/cfr/turn_river_game.rs @@ -247,6 +247,9 @@ pub struct TrSolver { regret: Vec>, sums: Vec>, pub iterations: u32, + /// Spare buffers for `walk` (reused across calls and iterations; contents never read before + /// they are written, so reuse changes no value). + spare: Vec>, } /// The average strategy: per decision node, per copy (1 on the turn, one per river card on the @@ -279,6 +282,35 @@ pub struct Exploit { } fn matched(regret: &[f64], a: usize, out: &mut [f64]) { + match a { + 2 => matched_n::<2>(regret, out), + 3 => matched_n::<3>(regret, out), + 4 => matched_n::<4>(regret, out), + _ => matched_any(regret, a, out), + } +} + +/// `matched_any` for a fixed action count (same operations: `Iterator::sum` folds from -0.0, and +/// -0.0 + x == x bit for bit, so the sum is r[0] + r[1] + ... in order). +fn matched_n(regret: &[f64], out: &mut [f64]) { + for (r, o) in regret.chunks_exact(A).zip(out.chunks_exact_mut(A)) { + let mut s = r[0]; + for x in &r[1..] { + s += x; + } + if s > 0.0 { + for t in 0..A { + o[t] = r[t] / s; + } + } else { + for y in o.iter_mut() { + *y = 1.0 / A as f64; + } + } + } +} + +fn matched_any(regret: &[f64], a: usize, out: &mut [f64]) { for (r, o) in regret.chunks(a).zip(out.chunks_mut(a)) { let s: f64 = r.iter().sum(); if s > 0.0 { @@ -344,7 +376,7 @@ impl TrSolver { } let sums = regret.clone(); let masks = [hands[0].masks.clone(), hands[1].masks.clone()]; - TrSolver { game: std::sync::Arc::new(game), n, cards, masks, same, weights, rc, wr, regret, sums, iterations: 0 } + TrSolver { game: std::sync::Arc::new(game), n, cards, masks, same, weights, rc, wr, regret, sums, iterations: 0, spare: Vec::new() } } pub fn hands(&self, player: usize) -> usize { @@ -392,6 +424,13 @@ impl TrSolver { /// Showdown values of player `p`'s combos on river card `r`: `half` x (win mass - lose mass). fn show(&self, p: usize, r: usize, opp: &[f64], half: f64) -> Vec { + let mut out = vec![0.0; self.n[p]]; + self.show_into(p, r, opp, half, &mut out); + out + } + + /// `show` into `out` (every entry written). + fn show_into(&self, p: usize, r: usize, opp: &[f64], half: f64, out: &mut [f64]) { let rc = &self.rc[r]; let (n_own, n_opp) = (self.n[p], self.n[1 - p]); let (own_o, own_r) = (&rc.order[p], &rc.rank[p]); @@ -407,7 +446,6 @@ impl TrSolver { let (mut less_t, mut less_c) = (0.0f64, [0.0f64; 64]); let mut eq_c = [0.0f64; 64]; let mut ptr = 0; - let mut out = vec![0.0; n_own]; let mut k = 0; while k < n_own { let s = own_r[own_o[k] as usize]; @@ -448,67 +486,126 @@ impl TrSolver { } k = e; } - out } fn mask_by_card(&self, v: &[f64], p: usize, r: usize) -> Vec { v.iter().zip(&self.rc[r].free[p]).map(|(x, f)| x * f).collect() } + /// A buffer of `n` zeros from the spares. + fn take(&mut self, n: usize) -> Vec { + let mut v = self.spare.pop().unwrap_or_default(); + v.clear(); + if v.capacity() < n { + // Room for the largest buffer `walk` asks for (hands x actions), so a spare never regrows. + let most = self.n[0].max(self.n[1]) * self.game.acts.iter().map(Vec::len).max().unwrap_or(1).max(1); + v.reserve(n.max(most)); + } + v.resize(n, 0.0); + v + } + + fn give(&mut self, v: Vec) { + self.spare.push(v); + } + + /// `disjoint(p, opp)[i] * v` into `out` (same operations as `disjoint` then the product). + fn fold_into(&self, p: usize, opp: &[f64], v: f64, out: &mut [f64]) { + let mut c = [0.0f64; 64]; + let mut t = 0.0; + for (j, w) in opp.iter().enumerate() { + let (a, b) = self.cards[1 - p][j]; + c[a] += w; + c[b] += w; + t += w; + } + for (i, o) in out.iter_mut().enumerate() { + let (a, b) = self.cards[p][i]; + *o = (t - c[a] - c[b] + self.same[p][i].map_or(0.0, |j| opp[j])) * v; + } + } + /// Counterfactual values of the traversing player `p`, one per own combo. fn walk(&mut self, node: usize, p: usize, own: &[f64], opp: &[f64], r: usize, weight: f64) -> Vec { let game = std::sync::Arc::clone(&self.game); match game.nodes[node] { TNode::Fold { folder, amt } => { let v = if folder == p { -amt } else { amt }; - self.disjoint(p, opp).into_iter().map(|x| x * v).collect() + let mut out = self.take(self.n[p]); + self.fold_into(p, opp, v, &mut out); + out + } + TNode::Show { half } => { + let mut out = self.take(self.n[p]); + self.show_into(p, r, opp, half, &mut out); + out } - TNode::Show { half } => self.show(p, r, opp, half), TNode::Chance { child } => { - let mut total = vec![0.0; self.n[p]]; + let mut total = self.take(self.n[p]); + let mut o = self.take(own.len()); + let mut q = self.take(opp.len()); for ri in 0..self.rc.len() { - let o = self.mask_by_card(own, p, ri); - let q = self.mask_by_card(opp, 1 - p, ri); + for ((x, v), f) in o.iter_mut().zip(own).zip(&self.rc[ri].free[p]) { + *x = v * f; + } + for ((x, v), f) in q.iter_mut().zip(opp).zip(&self.rc[ri].free[1 - p]) { + *x = v * f; + } let v = self.walk(child, p, &o, &q, ri, weight); let free = &self.rc[ri].free[p]; for i in 0..total.len() { total[i] += self.wr * v[i] * free[i]; } + self.give(v); } + self.give(o); + self.give(q); total } TNode::Dec { player, street, ref kids } => { let a = kids.len(); let n = self.n[player]; let off = if street == 0 { 0 } else { r * n * a }; - let mut sigma = vec![0.0; n * a]; + let mut sigma = self.take(n * a); matched(&self.regret[node][off..off + n * a], a, &mut sigma); if player == p { - let values: Vec> = kids - .iter() - .enumerate() - .map(|(k, kid)| { - let reach: Vec = (0..n).map(|i| own[i] * sigma[i * a + k]).collect(); - self.walk(*kid, p, &reach, opp, r, weight) - }) - .collect(); - let mut node_value = vec![0.0; n]; + let mut values: Vec> = Vec::with_capacity(a); + let mut reach = self.take(n); + for (k, kid) in kids.iter().enumerate() { + for (i, x) in reach.iter_mut().enumerate() { + *x = own[i] * sigma[i * a + k]; + } + values.push(self.walk(*kid, p, &reach, opp, r, weight)); + } + self.give(reach); + let mut node_value = self.take(n); + let (regret, sums) = (&mut self.regret[node], &mut self.sums[node]); for i in 0..n { node_value[i] = (0..a).map(|k| sigma[i * a + k] * values[k][i]).sum(); for k in 0..a { - let reg = &mut self.regret[node][off + i * a + k]; + let reg = &mut regret[off + i * a + k]; *reg = (*reg + values[k][i] - node_value[i]).max(0.0); - self.sums[node][off + i * a + k] += weight * own[i] * sigma[i * a + k]; + sums[off + i * a + k] += weight * own[i] * sigma[i * a + k]; } } + for v in values { + self.give(v); + } + self.give(sigma); node_value } else { - let mut total = vec![0.0; self.n[p]]; + let mut total = self.take(self.n[p]); + let mut reach = self.take(n); for (k, kid) in kids.iter().enumerate() { - let reach: Vec = (0..n).map(|j| opp[j] * sigma[j * a + k]).collect(); + for (j, x) in reach.iter_mut().enumerate() { + *x = opp[j] * sigma[j * a + k]; + } let v = self.walk(*kid, p, own, &reach, r, weight); total.iter_mut().zip(&v).for_each(|(t, x)| *t += x); + self.give(v); } + self.give(reach); + self.give(sigma); total } } diff --git a/src/engine/range_combos.rs b/src/engine/range_combos.rs index fa8b1660..2b869b7a 100644 --- a/src/engine/range_combos.rs +++ b/src/engine/range_combos.rs @@ -17,8 +17,8 @@ pub fn combos(rules: &Rules, filter: &HandFilter, dead: &[Card]) -> Option> = (0..pool.len()) .flat_map(|i| (i + 1..pool.len()).map(move |j| (i, j))) + .filter(|&(i, j)| filter(&[pool[i], pool[j]])) .map(|(i, j)| vec![pool[i], pool[j]]) - .filter(|hand| filter(hand)) .collect(); (!kept.is_empty()).then_some(kept) } diff --git a/src/engine/range_filter.rs b/src/engine/range_filter.rs index 35e5cd5e..cc1ecaa3 100644 --- a/src/engine/range_filter.rs +++ b/src/engine/range_filter.rs @@ -1,4 +1,7 @@ use crate::card::{deck, Card}; +use std::cell::RefCell; +use std::collections::HashMap; +use std::rc::Rc; use crate::exploit::range_spec::{Continuation, RangeSpec}; use crate::preflop::hand_percentile::percentile; use crate::read::draw::Draw; @@ -162,25 +165,86 @@ const RELAXED_HI: f64 = 0.5; /// When no hand of the preflop band meets some floor, the band contradicts what the /// villain did; the action wins and the band is relaxed to `[0, max(hi, 0.5)]`. pub fn range_filter(spec: &RangeSpec, rules: Rules, variant: Variant, board: &[Card]) -> HandFilter { - let board = board.to_vec(); - let (first, starved) = acceptances(spec, &rules, variant, &board); - let (spec, qs) = if starved { - let relaxed = RangeSpec { lo: 0.0, hi: spec.hi.max(RELAXED_HI), continues: spec.continues.clone() }; - let (qs, _) = acceptances(&relaxed, &rules, variant, &board); - (relaxed, qs) - } else { - (spec.clone(), first) + // The range depends on (spec, rules, variant, board) only - not on hero's cards - so one decision + // and every decision after it at the same spot (LBR asks every combo at a node) share it: the + // acceptances are computed once per key, and each hand's verdict once per key and hand. Text of + // the key: `Debug` of f64 round-trips, so different values never share an entry. The env switch + // `RERAISE_ZUG` is read once per process, so it cannot change under a kept entry. + let key = format!("{spec:?}|{rules:?}|{variant:?}|{board:?}"); + let shared = FILTERS.with(|f| f.borrow().get(&key).cloned()); + let shared = match shared { + Some(s) => s, + None => { + let s = Rc::new(Kept::new(spec, rules, variant, board)); + FILTERS.with(|f| { + let mut f = f.borrow_mut(); + if f.len() >= FILTER_CACHE { + f.clear(); + } + f.insert(key, s.clone()); + }); + s + } }; - Box::new(move |hand: &[Card]| { - let p = percentile(variant, hand); - p >= spec.lo - && p <= spec.hi - && spec.continues.iter().zip(&qs).enumerate().all(|(step, (c, (q, cut)))| { - match meets(&rules, c, hand, &board, step, cut.as_ref()) { + Box::new(move |hand: &[Card]| shared.contains(hand)) +} + +/// Ranges kept per thread (a decision builds a few; LBR revisits one spot ~1000 times in a row). +const FILTER_CACHE: usize = 256; + +thread_local! { + static FILTERS: RefCell>> = RefCell::new(HashMap::new()); +} + +/// One built range: the (possibly relaxed) spec, its ticket thresholds and strength cuts, and the +/// verdict per ordered two-card hand once asked (0 = not yet, 1 = out, 2 = in). +struct Kept { + spec: RangeSpec, + qs: Vec<(f64, Option)>, + rules: Rules, + variant: Variant, + board: Vec, + verdict: RefCell>, +} + +impl Kept { + fn new(spec: &RangeSpec, rules: Rules, variant: Variant, board: &[Card]) -> Kept { + let board = board.to_vec(); + let (first, starved) = acceptances(spec, &rules, variant, &board); + let (spec, qs) = if starved { + let relaxed = RangeSpec { lo: 0.0, hi: spec.hi.max(RELAXED_HI), continues: spec.continues.clone() }; + let (qs, _) = acceptances(&relaxed, &rules, variant, &board); + (relaxed, qs) + } else { + (spec.clone(), first) + }; + Kept { spec, qs, rules, variant, board, verdict: RefCell::new(vec![0; 52 * 52]) } + } + + fn judge(&self, hand: &[Card]) -> bool { + let p = percentile(self.variant, hand); + p >= self.spec.lo + && p <= self.spec.hi + && self.spec.continues.iter().zip(&self.qs).enumerate().all(|(step, (c, (q, cut)))| { + match meets(&self.rules, c, hand, &self.board, step, cut.as_ref()) { Some(true) => true, Some(false) => *q > 0.0 && ticket(hand, step) < *q, None => false, } }) - }) + } + + fn contains(&self, hand: &[Card]) -> bool { + if hand.len() != 2 { + return self.judge(hand); + } + let i = hand[0].index() as usize * 52 + hand[1].index() as usize; + let known = self.verdict.borrow()[i]; + if known != 0 { + return known == 2; + } + let v = self.judge(hand); + self.verdict.borrow_mut()[i] = if v { 2 } else { 1 }; + v + } } diff --git a/src/equity/monte_carlo.rs b/src/equity/monte_carlo.rs index 9aabf722..762b16aa 100644 --- a/src/equity/monte_carlo.rs +++ b/src/equity/monte_carlo.rs @@ -1,13 +1,13 @@ use super::estimate::Estimate; use super::outcome::Outcome; use super::query::Query; -use super::sample::{deal, deal_combo, shuffle_front}; +use super::sample::{deal, deal_combo, shuffle_front, Pool}; use super::tally::Tally; use super::validate::remaining_deck; use super::villain_range::VillainRange; use crate::card::Card; use crate::fault::Fault; -use crate::hand::showdown::judge; +use crate::hand::showdown::{best_with_board, holdem_lanes, judge}; use crate::rng::Rng; /// Seeded Monte Carlo equity. Same query + same rng ⇒ same estimate. @@ -15,7 +15,7 @@ use crate::rng::Rng; /// `Filter` ranges are sampled by bounded rejection (see `sample::deal` for the fallback), /// `Combos` ranges directly from their list (`sample::deal_combo`). pub fn estimate(query: &Query, rng: Rng) -> Result<(Estimate, Rng), Fault> { - let mut pool = remaining_deck(query)?; + let mut pool = Pool::new(remaining_deck(query)?); let (tally, rng) = (0..query.trials).try_fold((Tally::default(), rng), |(tally, rng), _| { let (outcome, rng) = play_trial(query, &mut pool, rng)?; Ok::<_, Fault>((tally.record(outcome), rng)) @@ -24,30 +24,27 @@ pub fn estimate(query: &Query, rng: Rng) -> Result<(Estimate, Rng), Fault> { } /// One deal: villain hands first (in query order), then the rest of the board. -fn play_trial(query: &Query, pool: &mut [Card], rng: Rng) -> Result<(Outcome, Rng), Fault> { +fn play_trial(query: &Query, pool: &mut Pool, rng: Rng) -> Result<(Outcome, Rng), Fault> { let k = query.rules.hole_cards; let rules = &query.rules; let accept_all = |_: &[Card]| true; + // Sampled hands go to the front of the pool in villain order, `k` cards each, so a villain's + // start is the running sum over the sampled villains before it (recomputed below, no list). let mut front = 0; let mut rng = rng; - // Where each villain's cards: Some(start in pool) for sampled hands. - let mut starts: Vec> = Vec::with_capacity(query.villains.len()); for villain in query.villains { match villain { - VillainRange::Exact(_) => starts.push(None), + VillainRange::Exact(_) => {} VillainRange::Any => { rng = deal(pool, front, k, &accept_all, rng); - starts.push(Some(front)); front += k; } VillainRange::Filter(accept) => { rng = deal(pool, front, k, *accept, rng); - starts.push(Some(front)); front += k; } VillainRange::Combos(combos) => { rng = deal_combo(pool, front, k, combos, rng); - starts.push(Some(front)); front += k; } } @@ -55,18 +52,29 @@ fn play_trial(query: &Query, pool: &mut [Card], rng: Rng) -> Result<(Outcome, Rn let missing = 5 - query.board.len(); rng = shuffle_front(pool, front, missing, rng); let mut board = [query.hero[0]; 5]; - query.board.iter().chain(&pool[front..front + missing]).enumerate().for_each(|(i, c)| board[i] = *c); + query.board.iter().chain(&pool.cards[front..front + missing]).enumerate().for_each(|(i, c)| board[i] = *c); - let hero = judge(rules, query.hero, &board)?; + // Standard hold'em: the board's suit lanes once, each two-card hand adds its own cards. Same value + // as `judge`, whose checks cannot fail here: `remaining_deck` made hero, board and known hands + // distinct and in the deck, and every dealt card comes from the pool of the others. + let lanes = holdem_lanes(rules, &board); + let strength_of = |hand: &[Card]| match &lanes { + Some(l) if hand.len() == 2 => Ok(best_with_board(l, hand)), + _ => judge(rules, hand, &board), + }; + let hero = strength_of(query.hero)?; let mut rivals_best = None; let mut rivals_tied = 0u32; - for (villain, start) in query.villains.iter().zip(&starts) { - let hand: &[Card] = match (villain, start) { - (VillainRange::Exact(cards), _) => cards, - (_, Some(s)) => &pool[*s..*s + k], - (_, None) => &[], + let mut start = 0; + for villain in query.villains { + let hand: &[Card] = match villain { + VillainRange::Exact(cards) => cards, + _ => { + start += k; + &pool.cards[start - k..start] + } }; - let strength = judge(rules, hand, &board)?; + let strength = strength_of(hand)?; match rivals_best { Some(top) if strength < top => {} Some(top) if strength == top => rivals_tied += 1, diff --git a/src/equity/sample.rs b/src/equity/sample.rs index a97a8555..fe358f9e 100644 --- a/src/equity/sample.rs +++ b/src/equity/sample.rs @@ -2,6 +2,10 @@ //! //! The pool is only ever permuted, so any arrangement is a uniform starting point for the next //! partial Fisher-Yates pass; the arrangement itself never leaks out of `monte_carlo`. +//! +//! `Pool` keeps, next to the cards, where each card sits (by `Card::index`), so finding a card is one +//! lookup instead of a scan; every swap updates both. The swaps themselves are exactly those of the +//! plain slice version, so the arrangement (and every deal after it) is the same. use crate::card::Card; use crate::rng::Rng; @@ -9,8 +13,39 @@ use crate::rng::Rng; /// Attempts a `Filter` range gets per hand before the last sample is accepted unfiltered. pub const MAX_FILTER_ATTEMPTS: u32 = 200; +/// The cards still to deal from, and the position of each (`at[card.index()]`; `u8::MAX` for cards +/// not in the pool). +pub struct Pool { + pub cards: Vec, + at: [u8; 64], +} + +impl Pool { + pub fn new(cards: Vec) -> Pool { + let mut at = [u8::MAX; 64]; + for (i, c) in cards.iter().enumerate() { + at[c.index() as usize] = i as u8; + } + Pool { cards, at } + } + + pub fn len(&self) -> usize { + self.cards.len() + } + + pub fn is_empty(&self) -> bool { + self.cards.is_empty() + } + + fn swap(&mut self, i: usize, j: usize) { + self.cards.swap(i, j); + self.at[self.cards[i].index() as usize] = i as u8; + self.at[self.cards[j].index() as usize] = j as u8; + } +} + /// Moves `count` uniformly chosen cards from `pool[front..]` to `pool[front..front + count]`. -pub fn shuffle_front(pool: &mut [Card], front: usize, count: usize, rng: Rng) -> Rng { +pub fn shuffle_front(pool: &mut Pool, front: usize, count: usize, rng: Rng) -> Rng { (0..count).fold(rng, |rng, i| { let (offset, rng) = rng.below((pool.len() - front - i) as u64); pool.swap(front + i, front + i + offset as usize); @@ -21,11 +56,11 @@ pub fn shuffle_front(pool: &mut [Card], front: usize, count: usize, rng: Rng) -> /// Deals `count` cards at `front`, re-sampling while `accept` refuses (bounded). /// Fallback: after `MAX_FILTER_ATTEMPTS` refusals the last sample is kept, i.e. a range that /// (almost) never matches degrades to a uniformly random hand instead of failing the run. -pub fn deal(pool: &mut [Card], front: usize, count: usize, accept: &dyn Fn(&[Card]) -> bool, rng: Rng) -> Rng { +pub fn deal(pool: &mut Pool, front: usize, count: usize, accept: &dyn Fn(&[Card]) -> bool, rng: Rng) -> Rng { let mut rng = rng; for _ in 0..MAX_FILTER_ATTEMPTS { rng = shuffle_front(pool, front, count, rng); - if accept(&pool[front..front + count]) { + if accept(&pool.cards[front..front + count]) { break; } } @@ -35,16 +70,20 @@ pub fn deal(pool: &mut [Card], front: usize, count: usize, accept: &dyn Fn(&[Car /// Deals one of `combos` at `front`: a uniformly chosen hand, re-chosen while one of its /// cards is gone (dead or dealt), bounded by `MAX_FILTER_ATTEMPTS`. Fallback: an empty list, /// or no hand left after the attempts, deals `count` random cards instead. -pub fn deal_combo(pool: &mut [Card], front: usize, count: usize, combos: &[Vec], rng: Rng) -> Rng { +pub fn deal_combo(pool: &mut Pool, front: usize, count: usize, combos: &[Vec], rng: Rng) -> Rng { let mut rng = rng; for _ in 0..if combos.is_empty() { 0 } else { MAX_FILTER_ATTEMPTS } { let (i, next) = rng.below(combos.len() as u64); rng = next; let combo = &combos[i as usize]; - let available = combo.len() == count && combo.iter().all(|c| pool[front..].contains(c)); + // In `pool[front..]`: in the pool, at or behind `front`. + let available = combo.len() == count && combo.iter().all(|c| pool.at[c.index() as usize] as usize >= front && pool.at[c.index() as usize] != u8::MAX); if available { for (k, card) in combo.iter().enumerate() { - let at = front + k + pool[front + k..].iter().position(|p| p == card).unwrap_or(0); + // The card's place if it is in `pool[front + k..]`, else `front + k` (a no-op swap): + // what the scan `front + k + position(..).unwrap_or(0)` gave. + let p = pool.at[card.index() as usize] as usize; + let at = if p >= front + k && p < pool.len() && pool.cards[p] == *card { p } else { front + k }; pool.swap(front + k, at); } return rng; diff --git a/src/hand/showdown.rs b/src/hand/showdown.rs index d9078012..3429a857 100644 --- a/src/hand/showdown.rs +++ b/src/hand/showdown.rs @@ -1,27 +1,45 @@ //! Best hand for a player under the variant's hole-card usage rule. use super::five::{evaluate, evaluate_in}; +use super::category::Category; use super::strength::Strength; use super::subset::{masks, pick}; use crate::card::Card; use crate::fault::Fault; -use crate::variant::{HoleUsage, Rules}; +use crate::variant::{DeckRule, HandRanking, HoleUsage, Rules}; /// Standard rules on the full deck: ace low in A-2-3-4-5, full house beats flush. /// Hold'em family: 5-7 cards in total. Omaha family: >= 2 hole and 3-5 board cards. /// Variants with their own deck or ladder go through `judge`. pub fn best(usage: HoleUsage, hole: &[Card], board: &[Card]) -> Result { distinct(hole, board)?; + if matches!(usage, HoleUsage::BestFiveOfAll) { + return best_of_all_standard(hole, board); + } select(usage, &evaluate, hole, board) } +/// `best_of_all(evaluate, ..)` by the direct evaluator: same checks, same value. +fn best_of_all_standard(hole: &[Card], board: &[Card]) -> Result { + if !(5..=7).contains(&(hole.len() + board.len())) || hole.is_empty() { + return Err(invalid("hold'em needs 5 to 7 cards including hole cards")); + } + Ok(best_standard(hole.iter().chain(board).copied())) +} + fn invalid(detail: &str) -> Fault { Fault::Invalid { field: "cards".into(), detail: detail.into() } } fn distinct(hole: &[Card], board: &[Card]) -> Result<(), Fault> { - let all: Vec = hole.iter().chain(board).copied().collect(); - let repeated = all.iter().enumerate().any(|(i, c)| all[..i].contains(c)); + // One bit per card (`index` is unique per rank and suit): a repeat finds its bit set. + let mut seen = 0u64; + let mut repeated = false; + for c in hole.iter().chain(board) { + let bit = 1u64 << c.index(); + repeated |= seen & bit != 0; + seen |= bit; + } if repeated { Err(Fault::Inconsistent("duplicate card".into())) } else { @@ -29,6 +47,122 @@ fn distinct(hole: &[Card], board: &[Card]) -> Result<(), Fault> { } } +/// The best five of 5 to 7 distinct cards under standard rules (full deck, standard ladder), without +/// enumerating subsets: the same `Strength` as `best_five_of(evaluate, ..)`, value for value (checked +/// against it on every 5-, 6- and 7-card hand, `tests::the_direct_evaluator_equals_enumeration_everywhere`). +fn best_standard(cards: impl Iterator) -> Strength { + best_of_lanes(lanes(cards)) +} + +/// One 13-bit lane per suit, bit `value - 2`. +fn lanes(cards: impl Iterator) -> [u32; 4] { + let mut s = [0u32; 4]; + for c in cards { + s[c.suit as usize] |= 1 << (c.rank.value() - 2); + } + s +} + +/// The suit lanes of a five-card board when `rules` are standard hold'em (two hole cards, best five +/// of all, full deck, standard ladder) - the case `best_with_board` serves - else `None`. +pub fn holdem_lanes(rules: &Rules, board: &[Card; 5]) -> Option<[u32; 4]> { + (rules.hole_cards == 2 && matches!(rules.hole_usage, HoleUsage::BestFiveOfAll) && standard(rules.deck, rules.ranking)) + .then(|| lanes(board.iter().copied())) +} + +/// The best five of a two-card `hole` and the board given as its lanes (`holdem_lanes`), for a caller +/// that guarantees the seven cards are distinct: the `Strength` `judge` gives them under standard +/// hold'em rules. +pub fn best_with_board(board: &[u32; 4], hole: &[Card]) -> Strength { + let mut s = *board; + for c in hole { + s[c.suit as usize] |= 1 << (c.rank.value() - 2); + } + best_of_lanes(s) +} + +fn best_of_lanes(s: [u32; 4]) -> Strength { + let v = |bit: u32| bit as u8 + 2; + let high = |bits: u32| 31 - bits.leading_zeros(); + // The `n` highest ranks of `bits` as values, most significant first. + let top = |mut bits: u32, out: &mut [u8; 5], from: usize, n: usize| { + for slot in out.iter_mut().skip(from).take(n) { + if bits == 0 { + break; + } + let h = high(bits); + *slot = v(h); + bits &= !(1 << h); + } + }; + // Top rank index of the highest five-run (ace also below the deuce), `None` without one. + let straight = |ranks: u32| { + let b = (ranks << 1) | ((ranks >> 12) & 1); + let run = b & (b >> 1) & (b >> 2) & (b >> 3) & (b >> 4); + (run != 0).then(|| 31 - run.leading_zeros() + 3) + }; + let mk = |c: Category, r: [u8; 5]| Strength::new(HandRanking::Standard, c, r); + let mut r = [0u8; 5]; + for lane in s { + if lane.count_ones() >= 5 { + return match straight(lane) { + Some(t) => mk(Category::StraightFlush, [v(t), 0, 0, 0, 0]), + None => { + top(lane, &mut r, 0, 5); + mk(Category::Flush, r) + } + }; + } + } + let ranks = s[0] | s[1] | s[2] | s[3]; + let four = s[0] & s[1] & s[2] & s[3]; + if four != 0 { + let q = high(four); + r[0] = v(q); + top(ranks & !(1 << q), &mut r, 1, 1); + return mk(Category::FourOfAKind, r); + } + let three = (s[0] & s[1] & s[2]) | (s[0] & s[1] & s[3]) | (s[0] & s[2] & s[3]) | (s[1] & s[2] & s[3]); + let two = (s[0] & s[1]) | (s[0] & s[2]) | (s[0] & s[3]) | (s[1] & s[2]) | (s[1] & s[3]) | (s[2] & s[3]); + if three != 0 { + let t = high(three); + let pair = two & !(1 << t); + if pair != 0 { + return mk(Category::FullHouse, [v(t), v(high(pair)), 0, 0, 0]); + } + } + if let Some(t) = straight(ranks) { + return mk(Category::Straight, [v(t), 0, 0, 0, 0]); + } + if three != 0 { + let t = high(three); + r[0] = v(t); + top(ranks & !(1 << t), &mut r, 1, 2); + return mk(Category::ThreeOfAKind, r); + } + if two.count_ones() >= 2 { + let hi = high(two); + let lo = high(two & !(1 << hi)); + r[0] = v(hi); + r[1] = v(lo); + top(ranks & !(1 << hi) & !(1 << lo), &mut r, 2, 1); + return mk(Category::TwoPair, r); + } + if two != 0 { + let p = high(two); + r[0] = v(p); + top(ranks & !(1 << p), &mut r, 1, 3); + return mk(Category::Pair, r); + } + top(ranks, &mut r, 0, 5); + mk(Category::HighCard, r) +} + +/// Standard rules: full deck and standard ladder (the direct evaluator applies). +fn standard(deck: DeckRule, ranking: HandRanking) -> bool { + deck == DeckRule::FULL && ranking == HandRanking::Standard +} + fn select( usage: HoleUsage, eval: &dyn Fn(&[Card; 5]) -> Strength, @@ -46,6 +180,11 @@ fn best_of_all(eval: &dyn Fn(&[Card; 5]) -> Strength, hole: &[Card], board: &[Ca if !(5..=7).contains(&all.len()) || hole.is_empty() { return Err(invalid("hold'em needs 5 to 7 cards including hole cards")); } + best_five_of(eval, &all) +} + +/// The best five-card subset of `all` (5 to 7 distinct cards) under `eval`, by enumeration. +fn best_five_of(eval: &dyn Fn(&[Card; 5]) -> Strength, all: &[Card]) -> Result { masks(all.len(), 5) .filter_map(|m| pick::<5>(&all, m)) .map(|five| eval(&five)) @@ -81,6 +220,93 @@ pub fn judge(rules: &Rules, hole: &[Card], board: &[Card]) -> Result Vec { + Card::parse_list("2c 3c 4c 5c 6c 7c 8c 9c Tc Jc Qc Kc Ac 2d 3d 4d 5d 6d 7d 8d 9d Td Jd Qd Kd Ad 2h 3h 4h 5h 6h 7h 8h 9h Th Jh Qh Kh Ah 2s 3s 4s 5s 6s 7s 8s 9s Ts Js Qs Ks As").unwrap() + } + + /// Every hand of `n` cards whose lowest card index is in `firsts`: the direct evaluator against + /// enumeration; returns the number checked. + fn every_hand(n: usize, firsts: impl Iterator) -> u64 { + let d = deck(); + let mut checked = 0u64; + let mut idx = vec![0usize; n]; + for f in firsts { + idx[0] = f; + // Odometer over the remaining n-1 strictly increasing indices. + for (j, slot) in idx.iter_mut().enumerate().skip(1) { + *slot = f + j; + } + if idx[n - 1] >= 52 { + continue; + } + loop { + let cards: Vec = idx.iter().map(|i| d[*i]).collect(); + let want = best_five_of(&evaluate, &cards).unwrap(); + let got = best_standard(cards.iter().copied()); + assert_eq!(got, want, "{:?}", cards.iter().map(|c| c.short()).collect::>()); + checked += 1; + // Advance (position 0 stays fixed). + let mut p = n - 1; + loop { + if p == 0 { + break; + } + if idx[p] < 52 - (n - p) { + idx[p] += 1; + for q in p + 1..n { + idx[q] = idx[q - 1] + 1; + } + break; + } + p -= 1; + } + if p == 0 { + break; + } + } + } + checked + } + + /// Every 5-card hand (fast enough for the normal suite). + #[test] + fn the_direct_evaluator_equals_enumeration_on_every_five_card_hand() { + assert_eq!(every_hand(5, 0..52), 2_598_960); + } + + #[test] + fn the_direct_evaluator_knows_wheel_and_steel_wheel() { + let c = |t: &str| Card::parse_list(t).unwrap(); + let w = best(HoleUsage::BestFiveOfAll, &c("Ah 2d"), &c("3c 4s 5h Kd Kc")).unwrap(); + assert_eq!((w.category, w.ranks), (Category::Straight, [5, 0, 0, 0, 0])); + let sf = best(HoleUsage::BestFiveOfAll, &c("Ah 2h"), &c("3h 4h 5h 6d 6c")).unwrap(); + assert_eq!((sf.category, sf.ranks), (Category::StraightFlush, [5, 0, 0, 0, 0])); + } + + /// Every 6- and 7-card hand (154 M), split over `PERF_THREADS` threads (default 2): + /// `cargo test --release the_direct_evaluator_equals_enumeration_everywhere -- --ignored --nocapture` + #[test] + #[ignore] + fn the_direct_evaluator_equals_enumeration_everywhere() { + let th: usize = std::env::var("PERF_THREADS").ok().and_then(|x| x.parse().ok()).unwrap_or(2); + for n in [6, 7] { + let total: u64 = std::thread::scope(|s| { + let hs: Vec<_> = (0..th).map(|t| s.spawn(move || every_hand(n, (0..52).filter(move |f| f % th == t)))).collect(); + hs.into_iter().map(|h| h.join().unwrap()).sum() + }); + eprintln!("{n} cards: {total} hands identical"); + assert_eq!(total, if n == 6 { 20_358_520 } else { 133_784_560 }); + } + } +} diff --git a/src/read/straight_draw.rs b/src/read/straight_draw.rs index 4e0f46a8..466a7339 100644 --- a/src/read/straight_draw.rs +++ b/src/read/straight_draw.rs @@ -12,9 +12,34 @@ use crate::variant::{HoleUsage, Rules}; /// How many different ranks complete a straight for hero. pub fn completing_ranks(rules: &Rules, census: &Census) -> u32 { + // The deck's windows once (at most 10), not once per rank. + let mut ws = [0u16; 16]; + let mut n = 0; + for w in windows(rules.deck) { + ws[n] = w; + n += 1; + } + let ws = &ws[..n]; + if matches!(rules.hole_usage, HoleUsage::BestFiveOfAll) { + // Rank `x` completes window `w` iff `x` is the one rank of `w` that hole + board lack and a + // hole rank in `w` is not on the board (the `completes` conditions, solved for `x`); so the + // completing ranks are the union, over windows missing exactly one rank, of that rank. + let (hole, board) = (census.hole_mask, census.board_mask); + let have = hole | board; + let done = ws.iter().fold(0u16, |done, &w| { + let missing = w & !have; + if missing.count_ones() == 1 && w & !board & !missing != 0 { done | missing } else { done } + }); + return (rules.deck.lowest.value()..=14u8).filter(|&pip| done & bit(pip) != 0 && census.total_count(pip) < 4).count() as u32; + } + scan(rules, census, ws) +} + +/// Every rank against every window (the definition; Omaha, and the reference for hold'em). +fn scan(rules: &Rules, census: &Census, ws: &[u16]) -> u32 { (rules.deck.lowest.value()..=14u8) .filter(|&pip| census.total_count(pip) < 4) - .filter(|&pip| windows(rules.deck).any(|w| completes(rules.hole_usage, census, w, bit(pip)))) + .filter(|&pip| ws.iter().any(|&w| completes(rules.hole_usage, census, w, bit(pip)))) .count() as u32 } @@ -59,3 +84,79 @@ fn backdoor_in(usage: HoleUsage, census: &Census, window: u16) -> bool { } } } + +#[cfg(test)] +mod perf_tests { + use super::*; + use crate::card::{Card, Rank, Suit}; + use crate::variant::{rules as rules_of, Variant}; + + /// The hold'em shortcut counts what the scan counts, on every rank pattern of two hole cards and a + /// flop, turn or river board (suits do not matter to straights), full and short deck. + #[test] + fn the_holdem_shortcut_equals_the_scan_on_every_rank_pattern() { + let ranks = [Rank::Two, Rank::Three, Rank::Four, Rank::Five, Rank::Six, Rank::Seven, Rank::Eight, Rank::Nine, Rank::Ten, Rank::Jack, Rank::Queen, Rank::King, Rank::Ace]; + let suits = [Suit::Clubs, Suit::Diamonds, Suit::Hearts, Suit::Spades]; + let mut checked = 0; + for variant in [Variant::Nlhe, Variant::ShortDeck] { + let rules = rules_of(variant); + let low = ranks.iter().position(|r| rules.deck.contains(*r)).unwrap(); + let deck = &ranks[low..]; + for n in 5..=7usize { + // Non-decreasing rank index sequences of length n, each rank at most four times. + let mut idx = vec![0usize; n]; + loop { + let mut used = [0usize; 13]; + let ok = idx.iter().all(|i| { + used[*i] += 1; + used[*i] <= 4 + }); + if ok { + // Every split into two hole cards and the board. + for a in 0..n { + for b in a + 1..n { + let mut seen = [0usize; 13]; + let cards: Vec = idx + .iter() + .map(|i| { + seen[*i] += 1; + Card { rank: deck[*i], suit: suits[seen[*i] - 1] } + }) + .collect(); + let hole = [cards[a], cards[b]]; + let board: Vec = (0..n).filter(|k| *k != a && *k != b).map(|k| cards[k]).collect(); + let census = Census::of(&hole, &board); + let ws: Vec = windows(rules.deck).collect(); + assert_eq!(completing_ranks(&rules, &census), scan(&rules, &census, &ws), "{hole:?} {board:?}"); + checked += 1; + } + } + } + // Next non-decreasing sequence. + let mut p = n; + loop { + if p == 0 { + break; + } + p -= 1; + if idx[p] + 1 < deck.len() { + idx[p] += 1; + for q in p + 1..n { + idx[q] = idx[p]; + } + break; + } + if p == 0 { + p = usize::MAX; + break; + } + } + if p == usize::MAX { + break; + } + } + } + } + assert!(checked > 100_000, "{checked}"); + } +} diff --git a/werkzeuge/perf_symbole.py b/werkzeuge/perf_symbole.py new file mode 100644 index 00000000..314d9dd5 --- /dev/null +++ b/werkzeuge/perf_symbole.py @@ -0,0 +1,76 @@ +#!/usr/bin/env python3 +"""Resolve a perf_probe sample file (src/bin/perf_probe/sampler.rs) into a flat and an inclusive profile. + + python werkzeuge/perf_symbole.py [top=40] + +Needs mingw `addr2line` / `objdump` and a build with line tables +(CARGO_PROFILE_RELEASE_DEBUG=line-tables-only). Inlined frames are expanded (`addr2line -i`), so +"inclusive" counts every function (inlined or not) once per sample it appears in. +""" +import collections +import re +import subprocess +import sys + + +def image_base(exe): + out = subprocess.run(["objdump", "-p", exe], capture_output=True, text=True).stdout + m = re.search(r"ImageBase\s+([0-9a-fA-F]+)", out) + return int(m.group(1), 16) + + +def kurz(name): + name = re.sub(r"::h[0-9a-f]{16}$", "", name) + name = re.sub(r"<[^<>]*>", "<>", name) if len(name) > 140 else name + return name + + +def main(): + exe, datei = sys.argv[1], sys.argv[2] + top = int(sys.argv[3]) if len(sys.argv) > 3 else 40 + basis = image_base(exe) + proben = [[int(x, 16) for x in z.split()] for z in open(datei) if z.strip()] + adressen = sorted({a for p in proben for a in p}) + eingabe = "\n".join(hex(basis + a) for a in adressen) + "\n" + out = subprocess.run(["addr2line", "-e", exe, "-f", "-i", "-C", "-a"], input=eingabe, capture_output=True, text=True).stdout + # Output: per address a line "0x..." then pairs (function, file:line), innermost inline first. + rahmen = {} + akt = None + zeilen = out.splitlines() + i = 0 + while i < len(zeilen): + z = zeilen[i] + if z.startswith("0x"): + akt = int(z, 16) - basis + rahmen[akt] = [] + i += 1 + continue + fn = kurz(z) + ort = zeilen[i + 1] if i + 1 < len(zeilen) else "" + rahmen[akt].append((fn, ort.split("\\")[-1].split("/")[-1])) + i += 2 + n = len(proben) + selbst = collections.Counter() + selbst_ort = collections.Counter() + inkl = collections.Counter() + for p in proben: + kette = [f for a in p for f in rahmen.get(a, [("?", "")])] + if kette: + selbst[kette[0][0]] += 1 + selbst_ort[f"{kette[0][0]} @{kette[0][1]}"] += 1 + for f in {f[0] for f in kette}: + inkl[f] += 1 + print(f"{n} samples") + print("\n== self (innermost function) ==") + for f, c in selbst.most_common(top): + print(f"{100 * c / n:6.2f}% {f}") + print("\n== self by line ==") + for f, c in selbst_ort.most_common(top): + print(f"{100 * c / n:6.2f}% {f}") + print("\n== inclusive ==") + for f, c in inkl.most_common(top * 2): + print(f"{100 * c / n:6.2f}% {f}") + + +if __name__ == "__main__": + main()