Hacker News new | past | comments | ask | show | jobs | submit login

I feel you are generous with x3 for Java: empirically, a straightforward rewrite to C easily gains you 30x, or more for heavily cache-local datasets.

And it's not setting any speed records among automatic memory management languages either. Swift is well ahead in performance without breaking a sweat. Some Common Lisp implementations generate faster code than Java without any JIT overhead and a billion investment into development.




Swift is a C++/Rust style language vs a Java language. It just looks really pretty, so you might not realize what it's implicitly doing under the hood.

It doesn't use full automatic GC, so of course it is going to be faster than Java.

Swift also has performance gotchas, like it's strings. It's strings are very easy to use in an non-performant way because they are going for full unicode correctness, even when you don't want it.

But it's also a young language with a whole bunch of low hanging fruit in the perf realm.

My perf scale is also more orientated towards business logic / app type things. If your really thinking about your perf and doing a rewrite in fully static C/C++, then I have no idea how much better you can get :)

Is common lisp fully GC?


Swift is distinctly not Rust although it looks a lot like it on the surface. It uses reference counting, just like Perl, Ruby or Python. RC is the most rudimentary form of garbage collection. Also has its problems, like dealing with circular references.

And yes, CL is fully GC. But my point is that's not the culprit. If your problem calls for allocation and management of heap memory, it has to be done one way or another, manually or via GC. GC overhead in that light can really be negligible, and it's other concerns (like scheduling and real time constraints) that typically make its use problematic.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: