http://qs321.pair.com?node_id=1199722


in reply to More Betterer Game of Life

That's really cool, excellent work. I'm almost surprised it became that much faster even in unoptimized form.

For optimum performance, standing on the shoulders of giants and creating an XS wrapper around lifelib would obviously be best, this would have the added advantage of supporting all (classes of) CAs that lifelib supports. That said, having a pure-Perl implementation that will run anywhere that Perl will is obviously valuable as well: lifelib is tied to a specific architecture and a handful of instruction sets. And to say you're beating the existing CPAN solutions would be an understatement.

(Speaking of CPAN: you do intend to eventually bundle this up and release it as a module, right?)

Replies are listed 'Best First'.
Re^2: More Betterer Game of Life
by eyepopslikeamosquito (Archbishop) on Sep 21, 2017 at 21:21 UTC

    For optimum performance, standing on the shoulders of giants and creating an XS wrapper around lifelib would obviously be best, this would have the added advantage of supporting all (classes of) CAs that lifelib supports. ... (Speaking of CPAN: you do intend to eventually bundle this up and release it as a module, right?)
    Thanks, I really like your idea of a XS wrapper around LifeLib. And yes, I'd like to get something onto CPAN later this year.

      Thanks, I really like your idea of a XS wrapper around LifeLib.

      Better yet, how about a Life module with different pluggable backends? Math::CellularAutomaton, say, using Math::CellularAutomaton::LifeLib, Math::CellularAutomaton::Organism or Math::CellularAutomaton::Organism_PP under the hood, depending on what's installed, what's supported by the current CPU architecture, and what is able to handle the CA the user wants to run.