Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Both slip and jscl takes the same time in my computer: 63 seconds to run the loop.


I can see what happens there in JSCL.. I took a look at

    (disassemble (lambda () (loop for i below (expt 10 8) count t)))
Seems TAGBODY is compiled into a while(true) which sets an exception handler on each iteration. (and then, LOOP macroexpands into a TAGBODY). I don't think there's a better way to do it, BTW — JS is simply not a friendly compilation target. But `try` on each iteration is quite costly, that's most probably the bottleneck here.


Hm, you're right, JSCL seems abnormally slow on this loop (27.5 sec here). SLip consistently takes 19.3 sec. My CPU is rather beefy (Ryzen 9 HX 370). What's your hardware and browser?

But JSCL is much faster on the fib example, that's why I thought it should be generally faster. After all, it compiles to JS.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: