Memoize Erlang function calls
The Erlang workshop has been a blast so far. Just wrote this quick snippet to memoize Erlang function calls. Enjoy!
Using it is pretty simple. Just start the memoize server and then send mfas to it.
1> memoize:start().
2> memoize:memoize(fun module:function/0, [Arguments]).
0 TrackBacks
Listed below are links to blogs that reference this entry: Memoize Erlang function calls.
TrackBack URL for this entry: http://admin.socklabs.com/mt-tb.cgi/2130
You might want to add some sort of expiration or LRU feature to the memoization cache or you could end up eating up a lot of memory...