4 ms·
Play around with the Computer Language Benchmarks Game. It's good at showing what some of the trade-offs are. Of course, it's really not very scientific, but
by Periodic 17y ago
Play around with the Computer Language Benchmarks Game. It's good at showing what some of the trade-offs are. Of course, it's really not very scientific, but it gives you an idea. http://shootout.alioth.debian.org/ http://shootout.alioth.debian.org/
You'll usually see C, C++, Java, Haskell, OCaml, Fortran, Scala, and Lisp in the 1-10x range (of the fastest solution). They all should be reasonably competative on most things, and so you might make your decision based on personal preference and available libraries.
This is in contrast to things like Ruby, Perl, and Python which are often take 100x the time.
- Tichy 17y agoThanks - I really need to pick up one of these languages. I know Java well, but don't want to use it anymore. So far I have only tried "slow" alternatives, though. Given my interests (machine learning), sometimes speed is called for.
- camccann 17y agoC# and Ada are typically fast as well (as expected). Interestingly, Erlang and Lua seem to consistently come out a bit ahead of almost everything else that's not compiled to native code, running on a JITing VM, and/or Lisp.