[Javascript] How to dim buttons
Håkan Magnusson
hakan at backbase.com
Thu Nov 13 09:24:24 CST 2003
Well, it's not a *billion* times faster, but this little simple test
case proves it to be at least 15% faster.
-------
var s='';
var iTime1 = new Date().valueOf();
for(var i=0;i<100000;i++){
s+="a";
}
var iTime2 = new Date().valueOf();
alert('With double quote : ' + (iTime2 - iTime1));
s='';
iTime1 = new Date().valueOf();
for(var i=0;i<100000;i++){
s+='a';
}
iTime2 = new Date().valueOf();
alert('With single quote : ' + (iTime2 - iTime1));
-------
So no, I wasn't talking about Perl, I was talking about JavaScript,
where there IS a difference.
Tim Makins wrote:
> Perhaps the person is getting mixed up with Perl, where there IS a
> difference :
> http://perl.about.com/library/weekly/aa052900a.htm
>
> Tim in Ireland.
>
>
> ----- Original Message -----
> From: "Peter Brunone" <peter at brunone.com>
>
>>*I* still want to know why someone claimed that single quotes
>>parse a million times faster than double quotes.
>>
>>-Peter
>
>
>
>
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript
>
> .
>
More information about the Javascript
mailing list