Conways Game of Life in Golang
Conways-Game-of-Life-in-Golang$ docker run -it -v `pwd`:/app/ golang:1.15.6-alpine3.12 /bin/sh
/go # cd ../app/
/app # go build game-of-life-sequence.go
/app # time ./game-of-life-sequence --display_world=false --max_rows=5000 --max_cols=5000
real 0m 1.08s
user 0m 0.97s
sys 0m 0.11s
/app # ./game-of-life-sequence --display_world=true --max_rows=5000 --max_cols=5000
----- ----- ----- ----- -----
: 1 : 0 : 0 : 1 : 0 :
----- ----- ----- ----- -----
: 1 : 0 : 1 : 1 : 1 :
----- ----- ----- ----- -----
: 0 : 1 : 0 : 0 : 0 :
----- ----- ----- ----- -----
: 0 : 0 : 0 : 0 : 1 :
----- ----- ----- ----- -----
: 1 : 0 : 0 : 1 : 1 :
----- ----- ----- ----- -----
Next Generation:
----- ----- ----- ----- -----
: 0 : 1 : 1 : 1 : 1 :
----- ----- ----- ----- -----
: 1 : 0 : 1 : 1 : 1 :
----- ----- ----- ----- -----
: 0 : 1 : 1 : 0 : 1 :
----- ----- ----- ----- -----
: 0 : 0 : 0 : 1 : 1 :
----- ----- ----- ----- -----
: 0 : 0 : 0 : 1 : 1 :
----- ----- ----- ----- -----
/app # time ./game-of-life-concurrency-fast --display_world=false --max_rows=5000 --max_cols=5000
real 0m 0.97s
user 0m 2.51s
sys 0m 0.43s
/app # ./game-of-life-concurrency-fast --display_world=true --max_rows=5000 --max_cols=5000
----- ----- ----- ----- -----
: 1 : 0 : 0 : 1 : 0 :
----- ----- ----- ----- -----
: 1 : 0 : 1 : 1 : 1 :
----- ----- ----- ----- -----
: 0 : 1 : 0 : 0 : 0 :
----- ----- ----- ----- -----
: 0 : 0 : 0 : 0 : 1 :
----- ----- ----- ----- -----
: 1 : 0 : 0 : 1 : 1 :
----- ----- ----- ----- -----
Next Generation:
----- ----- ----- ----- -----
: 0 : 1 : 1 : 1 : 1 :
----- ----- ----- ----- -----
: 1 : 0 : 1 : 1 : 1 :
----- ----- ----- ----- -----
: 0 : 1 : 1 : 0 : 1 :
----- ----- ----- ----- -----
: 0 : 0 : 0 : 1 : 1 :
----- ----- ----- ----- -----
: 0 : 0 : 0 : 1 : 1 :
----- ----- ----- ----- -----