Repository navigation
There are two main changes here. First, the garbage collection algorithm has to walk trees many times. We now distribute this work over cpus more effectively. This mainly helps when running with small step sizes but never hurts. Second, TCP_NODELAY is used. This prevents slowdowns between the server and frontend - this one was 'fun' to find. There are two env vars that may be of interest:
- GOL_PORT - sets the listen port for the server the default is 7654.
- GOL_WALK_THREADS - controls the number of threads used during gc walks. It defaults to physical processors - 1
Rustylife uses u32 nodeid/arena entries with u64 coordinates. It has an aggressive garbage collection algorithm. This is done so it does not overflow u32 nodeids. It also reuses garbage collected nodeids asap, never allocating new nodeids when there are reusable nodeids available. Looking at the code this presented an optimization opportunity. The nodes hash was removed. This improves performance vs v0.21 by about 25%. Slow cache compaction has been optimized too. This cache is used when the 'Step+1' mode is active and when the rectangle framing the pattern changes.
game_of_life - is a Linux executable
game_of_life.exe - is for Windows and was tested using wine
Run an executable and connect via a browser to http://localhost:7654/ and have fun. You can use the Edit button, then Cntrl+C to copy a pattern, and Cntrl+V to paste it into rustylife's edit dialog, then press Paste put the pattern onto the board. Use Play to run - it goes for about 126 million generations. Speed and Step control how fast it runs. Left click centers the board - you can also drag using the left mouse button. The mouse wheel zooms as does moving up or down holding both mouse buttons.
#Life 1.05
#N p_126m
5b4o$9bo$9bo$10b2o6$o$o$o10b2obobo2bo$b2o14bobo$b3o8b3o3b2o$b2o8b4obo
2bo$11bobo4bo$17b3o$14bobo2bo$11b2ob3obo$12b3ob4o!