[squeak-dev] Faster fibonacci

tim Rowledge tim at rowledge.org
Sat Apr 27 18:26:53 UTC 2019



> On 2019-04-27, at 1:43 AM, Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com> wrote:
> 
> 
> 
> 
> Just ask, it's in the inbox now :)

Good grief. That's some interesting code.

BUT - it isn't in the inbox so far as I can see; the newest Kernel mcz is http://source.squeak.org/inbox/Kernel-nice.1216.mcz ... oh, wait, I see you've put an even newer version in trunk. Phew, I thought you might have been suffering from uploading problems like my NuScratch stuff.

I merged (because I had my fastfib method already) your Kernel-nice.1220 and tried out [4784969 fastDoublingFib asString ] timeToRun . It crashed because of no Interval>>digitShiftSum: method, which needs to go into Collections I guess.

Previously
[4784969 fastDoublingFib asString ] timeToRun -> 136833mS (on my Pi3+)
Now 
[4784969 fastDoublingFib asString ] timeToRun  -> 21060mS
Call 6.5X faster. 

Assuming we are all confident about the correctness I'd urge making that the default multiply for large ints. Unless somebody is going to improve the plugin to assist in making this even faster?

tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Useful random insult:- Talks to plants on their own level.




More information about the Squeak-dev mailing list