diff --git a/results/benchmark.txt b/results/benchmark.txt index b069bc1..706efd5 100644 --- a/results/benchmark.txt +++ b/results/benchmark.txt @@ -1,8 +1,8 @@ ------------------------------------------------------------------------------------------------ Benchmark Time CPU Iterations ------------------------------------------------------------------------------------------------ -BM_NextBoard/iterations:3000/process_time/real_time 2.00 ms 7.47 ms 3000 -BM_RenderBoard/process_time/real_time 9.56 ms 9.54 ms 67 -Renders per second: 31.19 -Boards per second: 366.941 -BM_Main/iterations:1/repeats:1/process_time/real_time 5.45 s 18.0 s 1 +BM_NextBoard/iterations:3000/process_time/real_time 1.49 ms 5.46 ms 3000 +BM_RenderBoard/process_time/real_time 8.58 ms 8.56 ms 73 +Renders per second: 31.1896 +Boards per second: 499.033 +BM_Main/iterations:1/repeats:1/process_time/real_time 4.01 s 12.4 s 1 diff --git a/src/board/board.h b/src/board/board.h index 17c2739..b944c43 100644 --- a/src/board/board.h +++ b/src/board/board.h @@ -8,11 +8,14 @@ #include "threads.h" using uint = unsigned int; -using Cell = uint; + +using Cell = uint8_t; [[maybe_unused]] const Cell ALIVE = 1; -[[maybe_unused]] const Cell ALIVE_RENDER = UINT32_MAX; [[maybe_unused]] const Cell DEAD = 0; -[[maybe_unused]] const Cell DEAD_RENDER = 0; + +using RenderCell = uint; +[[maybe_unused]] const RenderCell ALIVE_RENDER = UINT32_MAX; +[[maybe_unused]] const RenderCell DEAD_RENDER = 0; struct BoardMeta { uint width; diff --git a/src/board/next.h b/src/board/next.h index 5b7545c..593e004 100644 --- a/src/board/next.h +++ b/src/board/next.h @@ -17,7 +17,7 @@ void nextBoardSection( const uint width, const Cell* input, Cell* output) { - uint neighbours[3] = {0, 0, 0}; + Cell neighbours[3] = {0, 0, 0}; uint nextYBase = 0; uint middleYBase = 0; uint lastYBase = 0;