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

Thanks... my experience with clojure on the JVM is it is in general slower than optimally tuned Java code. I really can't imagine that any of the other languages you listed would easily outperform the code I have here, but maybe since the use-case is a sweet spot for functional? The person who responded to me with the F# example reported a crazy low time, and I am wondering if they have a defect in the code. I think it is possible a true functional language could make some tweaks that Java can't (like realizing the function is idempotent and caching the response instead of recalculating it). Maybe that is why the F# example was so quick - either the way it times itself is defective, or perhaps the runtime memoizes the function.

My experience with all the languages in your sampler is that their runtime performance usually lags the Java on the JVM for general purpose programming. This is not an argument not to use them - I would prefer many of them in certain use cases. But if I want a managed runtime, and have some performance critical code that I am OK with being written in an imperative language, it is hard to beat the performance of simple Java on the JVM. There has been so much tuning to Hotspot over the last decade. That's been my experience anyways.



Interesting, and yes, I am a witness of how fast proper java is; and in extreme performance cases, I guess I'd turn to java before C++ ; maybe the f# also benefits from optimizations (like tail-call optimization) and the underlying VM? (though I don't know how performant the CLR is)




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

Search: