HTML5 Canvas
Written by: Simon Sarris
Featured Refcardz: Top Refcardz:
  1. Apache Hadoop
  2. Web Driver
  3. MVVM
  4. REST
  5. ADO.NET
  1. HTML5
  2. Ajax
  3. jQuery Selectors
  4. CSS Part 1
  5. Git

Link Details

Link 65269 thumbnail
User 188795 avatar

By villane
via villane.wordpress.com
Published: Feb 07 2008 / 10:07

Scala's for expressions are much more powerful than while loops or Java 5's for each, but iterating over Ranges can be quite slow in the current release version of Scala. Part of this seems to be caused by a performance blooper in Range that is already fixed for the next release, though. But the other part is that for expressions get converted into much more powerful functional constructs, whereas the imperative while is implemented as efficient byte-code that is very similar to the Java equivalent. At the end is an example of how for expressions make XML processing in Scala really simple.
  • 8
  • 0
  • 1676
  • 0

Comments

Add your comment
User 272670 avatar

obzen replied ago:

0 votes Vote down Vote up Reply

Thanks for these performance insights! Keep 'em coming.

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (8)



Voters Against This Link (0)