Еще одно сравнение скорости: C++/Java/Go/Scala
От: jazzer Россия Skype: enerjazzer
Дата: 03.06.11 07:08
Оценка: 38 (4)
Статья от Гугла:

Loop Recognition in C++/Java/Go/Scala
https://days2011.scala-lang.org/sites/days2011/files/ws3-1-Hundt.pdf

результаты: Sсala выиграла в размере исходного кода, Go — в скорости компиляции, Java — в размере сгенерированного (и заархивированного) кода, C++ — в скорости работы программы и требовательности программы к памяти.

Также там приводится последовательность оптимизаций и какой эффект они дали.

We implemented a well specified compact algorithm in four languages, C++, Java, Go, and Scala, and evaluated the results along several dimensions, finding factors of differences in all areas. We discussed many subsequent language specific optimizations that point to typical performance pain points in the respective languages.

We find that in regards to performance, C++ wins out by a large margin. However, it also required the most extensive tuning efforts, many of which were done at a level of sophistication that would not be available to the average programmer.

Scala concise notation and powerful language features allowed for the best optimization of code complexity.

The Java version was probably the simplest to implement, but the hardest to analyze for performance. Specifically the effects around garbage collection were complicated and very hard to tune. Since Scala runs on the JVM, it has the same issues.

Go offers interesting language features, which also allow for a concise and standardized notation. The compilers for this language are still immature, which reflects in both performance and binary sizes.

jazzer (Skype: enerjazzer) Ночная тема для RSDN
Автор: jazzer
Дата: 26.11.09

You will always get what you always got
  If you always do  what you always did
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.