On Fri, Feb 23, 2018 at 12:51 AM, Serhiy Storchaka <storch...@gmail.com> wrote:
> 22.02.18 14:29, Chris Angelico пише:
>> Not overly misleading; the point of it is to show how trivially easy
>> it is to memoize a function in Python. For a fair comparison, I'd like
>> to see the equivalent Julia code: the function, unchanged, with
>> something around the outside of it to manage caching and memoization.
>> Can that be done with a couple of trivial lines of code using only the
>> standard library?
> The article contains a reference to a Julia example.
>> Note that Julia also can memoize functions, see this example  provided
>> by Ismael V.C.
>  http://nbviewer.jupyter.org/gist/Ismael-VC/b04ad17ee44c89917803
Yep, but I don't know Julia enough to know if that's the standard
library, and there aren't timings for it (which also makes it harder
to skim for - I missed it on first read, and only found it when I
searched the page for 'memoize'). If that's standard library, my
conclusion would be "Winner: Tie".