Skip to content

Commit 2eaee92

Browse files
fglockDevin
andcommitted
Implement native flat array algorithm
Add fully-flat data path that avoids 2D<->1D conversion overhead: - generate_random_flat / generate_glider_flat - next_generation_flat (takes/returns arrayref) - print_grid_braille_flat - count_live_cells_flat Results on 100x100 grid, 1000 generations (no display): - scalar: 214 gen/s (baseline) - parallel: 1104 gen/s (5.2x) - flat: 1132 gen/s (5.3x, +2.5% vs parallel) The flat array provides a small speedup for computation-only workloads by avoiding array-of-arrays dereference overhead. Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <noreply@cognition.ai>
1 parent 4fb816f commit 2eaee92

1 file changed

Lines changed: 172 additions & 84 deletions

File tree

0 commit comments

Comments
 (0)