ChanServ changed the topic of #picolisp to: PicoLisp language | Channel Log: https://irclog.whitequark.org/picolisp/ | Check also http://www.picolisp.com for more information
libertas has quit [Ping timeout: 246 seconds]
libertas has joined #picolisp
<tankf33der> i could run rsa under profiler. never tried before.
<tankf33der> this is good way to try, right?
aw- has joined #picolisp
<Regenaxer> Good morning!
<Regenaxer> I found that the profile does not give good relative timings. I would do it manually, testing typical calls (with such big numbers) in separate loops
<Regenaxer> Really interesting why pil64 is so much slower. Looks likee something is wrong
<Regenaxer> Best is a dividing search. Pick parts of the program, e.g. _prim?
<Regenaxer> If still a big difference, look at **Mod or longRand etc.
<Regenaxer> I think in the end it is a single complex function like '/'
<tankf33der> i will try
<Regenaxer> cool
orivej has joined #picolisp
<tankf33der> on server difference is 2x.
<Regenaxer> Another hardware?
<tankf33der> yea, not cheap laptop.
<Regenaxer> quite a big difference
<tankf33der> http://ix.io/2xX6
<tankf33der> found this code is ~4x slower on pil64.
<Regenaxer> yeah, **Mod
<Regenaxer> getting closer
<tankf33der> checking loop itself, maybe all these check to T and NIL is slow in loop-do looping
<Regenaxer> good idea
rob_w has joined #picolisp
mtsd has joined #picolisp
mtsd has quit [Client Quit]
<Regenaxer> Still debugging DB in pil21, keeps crashing
<tankf33der> % is slower.
<Regenaxer> I see
<Regenaxer> so division
<tankf33der> yes.
<Regenaxer> I need to check what pil64 does
<Regenaxer> must be sub-optimal
<Regenaxer> thanks!
<Regenaxer> In any case good to know that pil21 is better! :)
michelp has quit [Ping timeout: 260 seconds]
<Regenaxer> Is it also a lot slower for small bignums?
<Regenaxer> i.e. numbers with more than 18 digits but not very big?
<tankf33der> for what operations ?
<Regenaxer> %
<Regenaxer> probably the same for /
<tankf33der> the same.
<tankf33der> proved.
<Regenaxer> So any bignum
<Regenaxer> bignum division
michelp has joined #picolisp
<tankf33der> for 18 digits % and / bench is the same.
<Regenaxer> ok
<tankf33der> the only place i know where pil64 is faster than pil21 is fibo
<Regenaxer> for less than 18 pil64 is faster I presume?
<tankf33der> the same numbers.
<tankf33der> for 18 digits % and / bench is the same.
<tankf33der> not faster.
<Regenaxer> I see
<Regenaxer> I think pil64 is faster for all Lisp interpreter operations
<tankf33der> in practical real tasks pil21 is faster or the same :)
<tankf33der> +- 5-20% is ok.
<Regenaxer> yes
<Regenaxer> in praxis no problem at all
<Regenaxer> One small drawback is larger stack consumption
<Regenaxer> About double I estimate
<Regenaxer> other memory usage is exactly the same
<Regenaxer> Double stack usage for saved Lisp data, plus a little for function call overhead
<Regenaxer> But this may be optimized away by 'opt'
<Regenaxer> OK, first I must continue with DB
<Regenaxer> it is still messy
<Regenaxer> and at the same time I'm extending Vip to support the 'edit' functionality of old pil, to assist in DB inspections
<Regenaxer> both goes hand-in-hand
rob_w has quit [Quit: Leaving]
rob_w has joined #picolisp
rob_w has quit [Quit: Leaving]
rob_w has joined #picolisp
Blue_flame has quit [Quit: killed]
Blue_flame has joined #picolisp
Blue_flame has quit [Remote host closed the connection]
Blue_flame has joined #picolisp
aw- has quit [Quit: Leaving.]
mtsd has joined #picolisp
DKordic has quit []
<Regenaxer> Cool! DB reading work
<Regenaxer> DB can be browsed with (vi (list *DB))
<Regenaxer> or shortcuts like (v {1} {B7})
<tankf33der> i got issue
<tankf33der> in pil21
<tankf33der> :
<tankf33der> ]# pil21 inc-db.l
<tankf33der> [inc-db.l:15] !? (arg)
<tankf33der> NIL -- Small number expected
<tankf33der> ?
<tankf33der> :
<tankf33der> arg without argument is not supported
<tankf33der> and i see calling arg in lib/db.l
<tankf33der> http://ix.io/2xYv
<Regenaxer> yes, I know
<Regenaxer> trivial fix
<tankf33der> ok
<Regenaxer> I'm still at the raw db
<Regenaxer> lib/db.l not used yet
<Regenaxer> Must test borderline issues, like maintaining block chains
<Regenaxer> probably still many bugs
<Regenaxer> chains of used and unused blocks, this is noy visible on the Lisp level
<Regenaxer> tankf33der, I think you tested 'zap' already, right?
<tankf33der> only trivial case:
<tankf33der> (test "abc" (str? (zap 'abc)))
<Regenaxer> ok
<Regenaxer> 'zap' on externals is harder
<Regenaxer> commit etc, free list
<Regenaxer> I hope 'dbck' is correct
<Regenaxer> the difference of used plus unused blocks and free blocks must be the total size
<tankf33der> yeah.
orivej has quit [Quit: orivej]
orivej has joined #picolisp
orivej has quit [Ping timeout: 265 seconds]
rob_w has quit [Quit: Leaving]
<tankf33der> Regenaxer: http://ix.io/2xZ2
<tankf33der> native on SPARC platform
<tankf33der> :)
<Regenaxer> I see
<Regenaxer> byte order
<Regenaxer> you read a long as 8 bytes?
<tankf33der> first time on non x86 platform.
<tankf33der> yes.
<Regenaxer> That's not portable
<Regenaxer> The result is correct
<Regenaxer> It has big endian then
<tankf33der> sure.
<Regenaxer> The test must know the endianess
<Regenaxer> or find out :)
<Regenaxer> by reading a number
<Regenaxer> So it is the first pil on a sparc?
<Regenaxer> pil64 I mean
<Regenaxer> We had ppc64, which is also big endian I think
<tankf33der> this is pil21.
<tankf33der> ==================
<tankf33der> $ pil21 +
<tankf33der> -> 6
<tankf33der> : (scl 6)
<tankf33der> -> atan2
<tankf33der> : (load "@lib/math.l")
<tankf33der> : (pow 2.0 3.0)
<tankf33der> !? (%@ "pow" 1000000 "Dbl1" "Dbl2")
<tankf33der> Bad ffi
<tankf33der> ==================
<tankf33der> all works expect system specific parts - later, networking, io, native, ....
<Regenaxer> hmm
<Regenaxer> But native works, no?
<tankf33der> http://ix.io/2xZ2
<tankf33der> as showen here, works in general.
<Regenaxer> yes
<Regenaxer> simple one
<Regenaxer> "Bad ffi" is from ffiPrep()
<Regenaxer> ffi lib function ffi_prep_cif()
<Regenaxer> hmm, but 'later' is not system specific
<Regenaxer> basically it is 'pipe'
<tankf33der> also doest not work.
<tankf33der> its ok, just for FYI.
<Regenaxer> pipe ?
<Regenaxer> I wonder what might be system dependent in 'pipe'
<Regenaxer> it is plain Unix
<Regenaxer> pipe + fork
<Regenaxer> Does it give problems at build time or at runtime?
<tankf33der> no.
<Regenaxer> So it works?
<tankf33der> just test fails.
<Regenaxer> hmm
<tankf33der> plio also fails.
<tankf33der> crashing, i would say.
<Regenaxer> Did it build right out of the box?
<tankf33der> no :)
<Regenaxer> What was necessary to change?
<Regenaxer> Makefile?
<tankf33der> in general problem is to run llc without -relocation-model=pic
<Regenaxer> I see
<Regenaxer> But we have it in Makefile
<tankf33der> i have to remove it.
<tankf33der> for solaris for picolisp binary.
<Regenaxer> or you mean "in general the solution is to run llc without"
<Regenaxer> and ASYNC
<Regenaxer> we had that issue also in pil64
<Regenaxer> *Sigio
<tankf33der> yes.
<Regenaxer> The ASYNC issue could better be handled in the Kakefile
<Regenaxer> Define it as zero
mtsd has quit [Quit: Leaving]
jibanes has quit [Ping timeout: 272 seconds]
jibanes has joined #picolisp
<beneroth> Regenaxer, can you come into jitsi for a short test?
<Regenaxer> yes, I'm just starting up
<beneroth> back
orivej has joined #picolisp
orivej has quit [Ping timeout: 272 seconds]
orivej has joined #picolisp
<tankf33der> https://rosettacode.org/wiki/Miller–Rabin_primality_test
<tankf33der> this pseudocode on top with nested loops makes me crazy, cant imagine how to reduce and implement.
<Regenaxer> Two nested loops?
<Regenaxer> Is the exit from the inner loop the problem?
<Regenaxer> "clean" way is (loop ... (T (loop ...
<Regenaxer> Simpler is perhaps (catch NIL (loop ... (loop ... (throw) ..
<tankf33der> i see
<tankf33der> maximum before was double nested, requires huge amount of energy.
viaken has quit [Quit: reboot]
viaken has joined #picolisp
orivej has quit [Ping timeout: 264 seconds]