|
On 16.12.2013 03:04, Sven Olsen wrote:
I use general memoizers (those that work on functions with 0-M arguments returning 0-N values) fairly frequently. A string serialization approach can certainly work (though table and function argument handling gets a bit dicy). But in the profiling tests I've done, an implementation that stores the arguments in a tree of tables is often significantly faster. There's at least one such implementation already linked from the lua users wiki: https://github.com/kikito/memoize.lua
I am just wondering, Is there something in common between arguments serialization/storing approaches for the memoization and the current implementation of the Lua Datalog engine [1][2]?
Kind Regards, Alek [1] http://sourceforge.net/p/datalog/code/ci/master/tree/ [2] http://www.ccs.neu.edu/home/ramsdell/tools/datalog/datalog.html