3 ms·
Your phrasing is slanted. Citing the abstract of the paper: > The implementations each use the languages’ idiomatic container classes, looping constructs, and
by loup-vaillant 15y ago
Your phrasing is slanted. Citing the abstract of the paper:
> The implementations each use the languages’ idiomatic container classes, looping constructs, and memory/object allocation schemes. It does not attempt to exploit specific language and run-time features to achieve maximum performance.
Meaning, they went out of their way to write idiomatic Scala and idiomatic Java. No performance tweak in Java nor in Scala. The way you phrased it make it sound like they paid more attention to their Scala implementation. If you really think that, say so. Beware though: that would be a direct accusation of intellectual dishonesty.
To me, Google's paper looks like clear (though not iron strong) evidence that idiomatic Scala is is faster than idiomatic Java, with the chosen implementations. Shortening that into "Scala is currently faster than Java" doesn't seem such a stretch. Now if you want to compare idiomatic Java written in Java, and idiomatic Java written in Scala, fine, but I don't think it's a fair comparison.
- scott_s 15y agoFrankly, their discussion is a bit confusing because they did have optimized versions discussed in the text. And the optimized Scala version did make fundamental changes to the algorithm. They could have kept a better division between the two - idiomatic versus optimized - in both their results and their discussion. So, jbooth is not accusing them of intellectual dishonesty. And if I consider the following three suppositions: jbooth's understanding of the paper was not complete, your understanding of the paper was not complete, and the people who wrote the paper are smart and hard working; then I simply conclude that performing and writing about this kind of study in a clear manner that will confuse none is very, very hard.
- loup-vaillant 15y ago> your understanding of the paper was not complete, Indeed: I have not read it. But now I plan to. (Edit: since when a pubic recognition of one's own fault is worth a down vote? My not having read the paper provides meaningful context, by temporarily undermining my authority. Down vote the grand parent, but leave this one at 1 point!)
- scott_s 15y agoI agree with your edit, and I tried to correct for it.
- jbooth 15y agoRead their section specifically on Scala. The algorithm as implemented in Scala was a different bag of oranges than the apples in the C/Java implementations. If you want to say that idiomatic Scala is so great, fine, although I wouldn't be so absolutist about it (remember the article on HN 2 days ago about the scala for loop being 20x as expensive as the while loop because of something to do with closures?). Anyways the point is that the comparison was not between two things that were at all the same. All that says is that this particular problem was better expressed in Scala, and nothing about how one was faster than the other.
- loup-vaillant 15y agoLooks like I should update. http://wiki.lesswrong.com/wiki/How_To_Actually_Change_Your_Mind http://wiki.lesswrong.com/wiki/How_To_Actually_Change_Your_M... Give me some time. http://news.ycombinator.com/item?id=2678994 http://news.ycombinator.com/item?id=2678994
- scott_s 15y agoAnd you should probably take a closer look at Figure 8 - note that the non-pro version of Scala that did not change the fundamental algorithm is still faster than the non-pro version of Java. The version you're mentioning is not in Figure 8. Again, I agree the results are confusing.