From c4719dbc053d01b72547f33d0d8f7d5d2b14e33d Mon Sep 17 00:00:00 2001 From: Martin Leitner-Ankerl Date: Sat, 11 Mar 2023 21:47:42 +0100 Subject: [PATCH] bugfix in GameOfLife Gotts_dots: 9,14 -> 9,15 --- src/benchmarks/GameOfLife.cpp | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/src/benchmarks/GameOfLife.cpp b/src/benchmarks/GameOfLife.cpp index 5c2737a..06104ee 100644 --- a/src/benchmarks/GameOfLife.cpp +++ b/src/benchmarks/GameOfLife.cpp @@ -105,13 +105,24 @@ BENCHMARK(GameOfLife_stabilizing) { BENCHMARK(GameOfLife_growing) { // https://conwaylife.com/wiki/Gotts_dots - game_of_life(bench, "Gotts dots", 2000, 4091, - {{0, 0}, {0, 1}, {0, 2}, {4, 11}, {5, 12}, {6, 13}, {7, 12}, {8, 11}, {9, 13}, {9, 14}, {9, 14}, - {185, 24}, {186, 25}, {186, 26}, {186, 27}, {185, 27}, {184, 27}, {183, 27}, {182, 26}, {179, 28}, {180, 29}, {181, 29}, - {179, 30}, {182, 32}, {183, 31}, {184, 31}, {185, 31}, {186, 31}, {186, 32}, {186, 33}, {185, 34}, {175, 35}, {176, 36}, - {170, 37}, {176, 37}, {171, 38}, {172, 38}, {173, 38}, {174, 38}, {175, 38}, {176, 38}}); + game_of_life(bench, "Gotts dots", 2000, 4599, + { + {0, 0}, {0, 1}, {0, 2}, // 1 + {4, 11}, {5, 12}, {6, 13}, {7, 12}, {8, 11}, // 2 + {9, 13}, {9, 14}, {9, 15}, // 3 + {185, 24}, {186, 25}, {186, 26}, {186, 27}, {185, 27}, {184, 27}, {183, 27}, {182, 26}, // 4 + {179, 28}, {180, 29}, {181, 29}, {179, 30}, // 5 + {182, 32}, {183, 31}, {184, 31}, {185, 31}, {186, 31}, {186, 32}, {186, 33}, {185, 34}, // 6 + {175, 35}, {176, 36}, {170, 37}, {176, 37}, {171, 38}, {172, 38}, {173, 38}, {174, 38}, {175, 38}, {176, 38}, // 7 + }); // https://conwaylife.com/wiki/Puffer_2 - game_of_life(bench, "Puffer 2", 2000, 7400, {{1, 0}, {2, 0}, {3, 0}, {15, 0}, {16, 0}, {17, 0}, {0, 1}, {3, 1}, {14, 1}, {17, 1}, {3, 2}, - {8, 2}, {9, 2}, {10, 2}, {17, 2}, {3, 3}, {8, 3}, {11, 3}, {17, 3}, {2, 4}, {7, 4}, {16, 4}}); + game_of_life(bench, "Puffer 2", 2000, 7400, + { + {1, 0}, {2, 0}, {3, 0}, {15, 0}, {16, 0}, {17, 0}, // line 0 + {0, 1}, {3, 1}, {14, 1}, {17, 1}, // line 1 + {3, 2}, {8, 2}, {9, 2}, {10, 2}, {17, 2}, // line 2 + {3, 3}, {8, 3}, {11, 3}, {17, 3}, // line 3 + {2, 4}, {7, 4}, {16, 4}, // line 4 + }); }