-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
on Lispkits performance #25
Comments
If you care about performance then LispKit isn't really the right tool as it inherits quite a few performance penalties from Swift itself (e.g. it uses enumerations with associated values extensively which tend to be quite slow and also ARC as garbage collector). But if you do want to benchmark it, you should definitely only use release binaries. The difference is significant. You can create a release binary with
And these are the results for
The results are exactly what I would expect: LispKit should have a similar startup time compared to Gauche. But anything computationally expensive will be way slower compared to an optimizing compiler like Gauche (at least an order of magnitude). You can see that a significant amount of time is spent in the mathematical functions (which are all automatically turned into native integer arithmetic by Gauche) by replacing LispKit's polymorphic arithmetics with plain fixnum operations: (define (fib n)
(if (fx<= n 1) n
(fx+ (fib (fx1- n))
(fib (fx- n 2)))))
(display (fib 25))
(newline) Here's how that performs:
Another interesting observation — and this is why I gave up running microbenchmarks long ago — is that the performance of code compiled with Xcode IDE is significantly better than with the command-line tools. Using the
And this is what I get with the latest version of
|
Hi,
I just run a simple and very limited benchmark to get idea where Lispkit score in terms of and startup and runtime performance. Below there are some mesurements where the test shows that Lispkit is slower.
Can you say something on Lispkits performance? Are there specific reasons? Is my testing setup wrong?
Thanks
Simple hello.scm
Lispkit
Gauche
Simple fib.scm
Lispkit
Gosh
The text was updated successfully, but these errors were encountered: