Skip to content

Releases: edt-xx/rustylife

v0.25 - More optimizations

Choose a tag to compare

@edt-xx edt-xx released this 11 Oct 14:25

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!

Cleanups, Safety Checks, Refactoring & More tests

Choose a tag to compare

@edt-xx edt-xx released this 01 Oct 21:12

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!

Better slow cache controller

Choose a tag to compare

@edt-xx edt-xx released this 26 Sep 20:26

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 ~25%. This version optimizes how the slow cache is compressed. 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!

v0.22 performance

Choose a tag to compare

@edt-xx edt-xx released this 18 Sep 17:59

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 ~25%.

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!

0.21 minor .rle and .mc fixes

Choose a tag to compare

@edt-xx edt-xx released this 14 Sep 14:48

Found a problem with .rle processing and fixed a minor .mc issue.

Rustylife uses u32 nodeid/arena entries with u64 coordinates. This improves the hashing speed. Performance is maximized when the size of these hashes are minimized. This release uses a smarter algorithm to reuse garbage collected nodeids asap. This can speed up animation of some patterns 20-25%.

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, 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!

v0.20 performance increase

Pre-release

Choose a tag to compare

@edt-xx edt-xx released this 10 Sep 21:43
f8f72f7

After lots of perf runs and experiments we found the number of nodes in the main hashes was the main bottleneck that was slowing down rustylife. This release optimizes how nodes are allocated.

Rustylife uses u32 nodeid/arena entries with u64 coordinates. This improves the hashing speed. Performance is maximized when the size of these hashes are minimized. This release uses a smarter algorithm to reuse garbage collected nodeids asap. This can speed up animation of some patterns 20-25%.

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 the following pattern, and Cntrl+V to paste it into rustylife, 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.

#Life 1.05
#N p_126m

5b4o$9bo$9bo$10b2o6$o$o$o10b2obobo2bo$b2o14bobo$b3o8b3o3b2o$b2o8b4obo
2bo$11bobo4bo$17b3o$14bobo2bo$11b2ob3obo$12b3ob4o!

v0.11 changed to mimalloc

Pre-release

Choose a tag to compare

@edt-xx edt-xx released this 08 Aug 21:13

Change global allocator to mimalloc to avoid needing avx512 in the fast path. This lets the optimized binary run on my older laptop.

v0.1 Initial test release

Pre-release

Choose a tag to compare

@edt-xx edt-xx released this 05 Aug 19:06

The Linux binary should work on a cpu supporting avx2 and avx512. The windows .exe is untested and might work...