3 ms·
Memoization is pretty easy to implement yourself without any special language support. It's cool to make it part of the standard library but it's not like some
by blt 12y ago
Memoization is pretty easy to implement yourself without any special language support. It's cool to make it part of the standard library but it's not like some magic sauce. Especially given that D always uses hash tables. In the Fibonacci example given, a simple array would have much, much better performance.
- repsilat 12y ago> In the Fibonacci example given, a simple array would have much, much better performance. When I looked at the output of the hash function in Python for integers a few weeks ago it looked like the identity function was being used. You'll still have greater complexity than an array, but I'm not sure how much greater.
- Shorel 12y agoIt was dead easy in Common Lisp. That's the most impressive thing about it.