全部博文(413)
分类: C/C++
2011-12-14 19:55:44
However, the paper notes: "While the benchmark itself is simple and compact, it employs many language features, in particular, higher-level data structures (lists, maps, lists and arrays of sets and lists), a few algorithms (union/find, dfs/deep recursion, and loop recognition based on Tarjan), iterations over collection types, some object oriented features, and interesting memory allocation patterns."
Above: Run-time measurements, including a few optimizations.
After benchmark tests were published within Google various employees took a stab at(试图作某事) optimizing the code for specific languages.
The conclusions:
The phrase "lies, damn lies and benchmarks" is by now a cliche(陈词滥调). Suffice it to say, benchmarks never tell the full story, and there are many factors to consider when choosing a programming language. That said, you may find parts of this paper enlightening, especially with regards to Scala performance.