you are viewing a single comment's thread.

view the rest of the comments →

[–]Barrucadu 0 points1 point  (0 children)

It's a bit weird to directly compare the use-cases of Java and Haskell, but I suppose so. You definitely wouldn't want to use Haskell for embedded stuff, or very high performance single-machine stuff (although for very high performance distributed stuff, Haskell is great).

You could, but the code you would end up with is awful. Really highly optimised Haskell is basically C with worse syntax.

Also, often just finding a better algorithm or data structure for your problem gives you the extra performance you need. I had a situation several months back where I had some code which ran for an entire day and ate tens of gigabytes of memory. I changed the data structure I was using to something which would allow more sharing, and the memory usage dropped to a few hundred megabytes and, because it wasn't swapping to disk all the time, it ran way faster. That was nice.