[scala-user] for-loops still not optimized in 2.10?

'What Is Micro Benchmark?' tutorial was cited in a Grokbase forum in 2013.

The What Is Micro Benchmark? tutorial was cited in a Grokbase forum post in 2013.

Subject: [scala-user] for-loops still not optimized in 2.10?
Date: Apr 10, 2013
Author: Rex Kerr
Source: http://grokbase.com/t/gg/scala-user/134816ytca

>I have code that repeatedly computes dot products of Double vectors.
>I've replaced the functional version, which was too slow, with a for-
>loop and a var. However, this version is still slower than my
>previous Ocaml version (which uses zip and map). I've therefore
>replaced it by a while-loop, which is 2.5 times faster than the for-
>I've compiled the code with Scala 2.10 and -optimize.
>What kind of optimization does Scala do for for-loops? Is a
>significant difference to while-loops still to be expected?

The very first thing I said about benchmarking is that you weren't
measuring what you thought you were (or at least not what you were
claiming to measure), explained what you were measuring, and suggested
tools that help reduce the burden of making accurate measurements. I'm
not sure how you interpreted that as critical. (I was critical of the
a(i++) thing, but that's a completely separate issue.)

P.S. Maybe I should have linked to some JVM microbenchmarking articles
initially (all mostly right, though I do not guarantee a complete
absence of mistakes):

Table of Contents

 About This Book

 Reference Citations in 2021

 Reference Citations in 2020

 Reference Citations in 2019

 Reference Citations in 2018

 Reference Citations in 2017

 Reference Citations in 2016

 Reference Citations in 2015

 Reference Citations in 2014

Reference Citations in 2013

 (Android) Getting Current Date and Time

 Deatil View with other language

 Ordering and Installing SSL

 JDK (JBoss/Tomcat) SSL Issue

 Web-palveluiden koostaminen: web- ja RESTful-palvelut

 Corso di Architetture Orientate ai Servizi

 Hardening a SAS Installation on a multi tier installation on Linux

[scala-user] for-loops still not optimized in 2.10?

 .bin/.cue - the purpose of .cue?

 (horror movie) com.hellogood.eCalendar

 Using keytool to convert bks file to p12

 Error while using LWP::Socket to send XML Data

 jdk 1.7 keytool doesn't save

 Distributed Key System Broken Up Over Multiple Nodes

 Upgrading to a Mantis UTF8

 Cant receive MMS with wifi turned on

 Including and using the MySql.Data.dll on your web host server

 Spring Download (in Korean)

 Android Data Storage Folders

 Distributed Key Systems: Enhancing Security...

 WP Spreadplugin Basket not shown

 How do you get multiple resultset from a single CallableStatement?

 Blowfish Cipher Algorithm in Java

 Harmonics Systems for Time Mining

 Reference Citations in 2012

 Reference Citations in 2011

 Reference Citations in 2010

 Reference Citations in 2009

 Reference Citations in 2008

 Reference Citations in 2007

 Reference Citations in 2006

 Reference Citations in 2005

 Reference Citations in 2004

 Reference Citations in 2003