Re: Pil vs Pil21 performances

2020-09-05 Thread Mike
hi all,

September 5, 2020 12:28 AM, "Davide BERTOLOTTO"  
wrote:

> 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...


1.
There are several unofficial mirrors to get sources:
daily:
https://github.com/picolisp/pil21

hourly:
https://git.envs.net/mpech/pil21
https://hub.darcs.net/tankf33der/pil21

2.
There is unofficial test suite:
https://git.envs.net/mpech/pil21-tests
Eventually running on: Arch, Void, Alpine, Centos, Oracle Linux, Fedora, Debian.

3.
This is required steps to compile on Solaris and Macos, please try to repeat on 
others OS.
LLVM7+ required plus ecosystem.
https://git.envs.net/mpech/pil21-tests/src/branch/master/INSTALL-.md 


4. for running pil21 I copied pil to pil21 script, and have easy separation 
between implementations:
[mpech@lambda pil21]$ ls -l pil*
-rwxr-xr-x 1 mpech mpech 62 aug 30 22:47 pil
-rwxr-xr-x 1 mpech mpech 62 aug 30 22:47 pil21
$

5.
p.s. "ulimit -s 16000" is good start point for pil21.
p.s.s. To make some noise and fun try to run your picolisp's code on pil21.
p.s.s.s. Comparing LLVM and Assembler backend is not fair, and pil21 will be 
always slower in 5-15% range. 

(mike)

--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe



Re: Pil vs Pil21 performances

2020-09-05 Thread Alexander Burger
On Fri, Sep 04, 2020 at 11:17:44PM +0200, Davide BERTOLOTTO wrote:
> 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...

Good to know. Perhaps the optimizer also improves stack usage somehow?

☺/ A!ex

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe



Re: Pil vs Pil21 performances

2020-09-05 Thread Alexander Burger
Hi Davide,

> 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 8 fib 4589178984+
> -- picolisp 0.518 sec
> -- pil21 0.409 sec
> -- python 0.124 sec

Thanks for testing!

We found similar relations too.


> 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)

Yes. The reason is that pil21 needs more stack space, due to a more limited
control of the stack (as opposed to asm in pil64). So it gives a stack overflow.

Both pil64 and pil21 do runtime stack checks only if one ore more coroutines are
active. Otherwise they delegate the check to the hardware, resulting a
segmentation fault.

You can run it the test you set a higher stack limit, e.g. in .bashrc with

   ulimit -s 262144  # 256 MiB

☺/ A!ex

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Pil vs Pil21 performances

2020-09-04 Thread Davide BERTOLOTTO
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 
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 8 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
>


Pil vs Pil21 performances

2020-09-04 Thread Davide BERTOLOTTO
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 8 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