[OpenLayers-Dev] Re: [OpenLayers 3] type instantiation performance

Xavier Mamano (jorix) xavier.mamano at gmail.com
Thu Oct 21 16:45:35 EDT 2010



Andreas Hocevar-2 wrote:
> 
> To all testers: keep in mind that javascript engines can optimize things
> like
> 
> function() {
>   return {x: 3, y: 2};
> }
> 
> to be treated like a constant, so it will not give you valid test results.
> Instead, you should test for something like
> 
> function() {
>   return {x: Math.random(), y: Math.random()};
> }
> 
> Regards,
> Andreas.
> 
> On Oct 21, 2010, at 21:03 , Peter Robins wrote:
> 
>> the other obvious conclusion that comes out of these numbers is that
>> every OL user should be strongly recommended to use Chrome. It's clear
>> to the naked eye that Chrome is faster at rendering than IE, but I
>> hadn't realised just what a large difference there is - extraordinary!
>> Has anyone done any browser speed comparisons for other parts of OL?
>> _______________________________________________
>> Dev mailing list
>> Dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/openlayers-dev
> 
> 
> 
> -- 
> Andreas Hocevar
> OpenGeo - http://opengeo.org/
> Expert service straight from the developers.
> 
> _______________________________________________
> Dev mailing list
> Dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-dev
> 
> 
Good appreciation Andreas, now Chome is still the best but it's not a
miracle :-)

IE 8.0.6
    OpenLayers.Class; 2152.1
    Pure JavaScript; 1081.5
    Object Litteral; 911.9
    OpenLayers.Pixel; 2091.1
    Pure JavaScript Pixel; 1089.0
    Pure JavaScript Pixel using argument options; 1437.2

FF 3.6.11 + Firebug
    OpenLayers.Class; 1164.9
    Pure JavaScript; 275.8
    Object Litteral; 281.0
    OpenLayers.Pixel; 1179.2
    Pure JavaScript Pixel; 274.0
    Pure JavaScript Pixel using argument options; 377.2

Safari 5.0.2
    OpenLayers.Class; 586.8
    Pure JavaScript; 80.8
    Object Litteral; 95.8
    OpenLayers.Pixel; 640.2
    Pure JavaScript Pixel; 84.6
    Pure JavaScript Pixel using argument options; 110.6

Chrome 6.0.4
    OpenLayers.Class; 250.6
    Pure JavaScript; 135.7
    Object Litteral; 136.1
    OpenLayers.Pixel; 249.8
    Pure JavaScript Pixel; 133.7
    Pure JavaScript Pixel using argument options; 141.7
    
I put also :
 p = {x: parseFloat(23.4), y: parseFloat(42.4)}; 
in Object Litteral (case 3).


I have attached the changed test: 
http://osgeo-org.1803224.n2.nabble.com/file/n5660273/_class_.html
_class_.html .


Regards,

Xavier



-- 
View this message in context: http://osgeo-org.1803224.n2.nabble.com/OpenLayers-3-type-instantiation-performance-tp5641805p5660273.html
Sent from the OpenLayers Dev mailing list archive at Nabble.com.


More information about the Dev mailing list