Ok, I managed to turn on the optimization (opt -O3) and the results improved
*** recursive -- picolisp 3.007 sec -- pil21 4.249 sec *** iterative -- picolisp 0.515 sec -- pil21 0.368 sec Apparently with the optimization cache does not segfault... Cheers, Davide On Fri, Sep 4, 2020, 22:50 Davide BERTOLOTTO <davide.bertolo...@gmail.com> wrote: > Hi all, > > I compiled pil21 with llvm on termux and then I ran some simple fibonacci > benchmark. Here the results > > *** recursive > n 37 fib 24157817 > -- picolisp 3.013 sec > -- pil21 5.332 sec > -- python 21.247 sec > > *** iterative > n 80000 fib 4589178984+ > -- picolisp 0.518 sec > -- pil21 0.409 sec > -- python 0.124 sec > > I got also a segmentation fault while trying to use cache to speed up the > calculation with pil21 (don't know if Alex is aware of that) > > From the results it seems that performance of llvm are slightly better for > iterative solutions and fairly worse for recursive solutions > > Question: I used the makefile in the pil21.tgz to compile pil21. Is there > any optimization in? I didn't dig (yet) into llvm compiler flags :) > > Regards, > Davide >