4 ms·
Read 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.
by jbooth 15y ago
Read 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.