开发者

Choose splatform-independent language for math-intensive computations

I am planning on making a flame fractal engine (no GUI), similar to flam3, but I need to chose a language. I have one such engine made in Java already, but it is too slow.

What I seek is a compiled language, that can be compiled to both windows and Linux (hence no .NET, GPU language), and preferably with garbage collecting and object-orientation (so no C, and C++).

What languages out there, except D, satisfy these conditions? Any other thoughts on t开发者_StackOverflow中文版his?

EDIT: I am more after what similar alternatives there is to D, since D is still in development. I will probably choose D, since it has native support for complex numbers, among other things. However, C++ is more accessible to other developers, but it is a hard language, in my opinion.


This will undoubtedly start a new flamewar until someone closes the question. My personal opinion is you should use C++, where the missing garbage collection is something you should accept, since manual memory management offers you more performance tuning options.

Google announced a research paper yesterday about a Java / C++ / Go / Scala comparison, you may find it helpful:

https://days2011.scala-lang.org/sites/days2011/files/ws3-1-Hundt.pdf


You made yourself a very tough task (and asked an interesting question, by the way).

The only language that springs to my mind is Ada (it has an optional garbage collector, as discussed in this thread, and according to this book it support object-orientation). This Ubuntu comparison shows that Ada 2005 is quite fast, generally faster in benchmarks than Java, but slower than C/C++.

Disclaimer: I do not claim that Ada is superior to any other language. In fact, I have not used it in any reasonable application. I believe using C++ will produce faster code; moreover, probably the effort required to manage the memory manually in C++ is worth the speed improvement, but I am not an expert in this. This is not to start a flamewar (as @Doc pointed out, it may happen); just my opinion on the topic.


I decided to go for D, since it is closest to what I want. I was merely curious what other languages that were comparable to D.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜