flex-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Piotr Zarzycki (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (FLEX-35330) [FlexJS] comparison of objects using non strict inequality or non strict equality is slow
Date Sat, 24 Jun 2017 09:13:02 GMT

    [ https://issues.apache.org/jira/browse/FLEX-35330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16061868#comment-16061868
] 

Piotr Zarzycki edited comment on FLEX-35330 at 6/24/17 9:12 AM:
----------------------------------------------------------------

*Chrome (60.0.3112.40) , Windows 10:*

Uninitialised != : 45
Uninitialised !== : 29
Null initialised != : 20
Null initialised !== : 26

Uninitialised != : 27
Uninitialised !== : 20
Null initialised != : 16
Null initialised !== : 19

Uninitialised != : 30
Uninitialised !== : 19
Null initialised != : 16
Null initialised !== : 20

Uninitialised != : 25
Uninitialised !== : 23
Null initialised != : 16
Null initialised !== : 21

Uninitialised != : 27
Uninitialised !== : 21
Null initialised != : 18
Null initialised !== : 19

*Firefox 54.0 (32 bit), Windos 10:*

Uninitialised != : 9
Uninitialised !== : 14
Null initialised != : 9
Null initialised !== : 12

Uninitialised != : 10
Uninitialised !== : 14
Null initialised != : 10
Null initialised !== : 14

Uninitialised != : 10
Uninitialised !== : 13
Null initialised != : 10
Null initialised !== : 15

Uninitialised != : 11
Uninitialised !== : 15
Null initialised != : 10
Null initialised !== : 13

*Edge, Windows 10:*

Uninitialised != : 9
Uninitialised !== : 11
Null initialised != : 11
Null initialised !== : 12

Uninitialised != : 9
Uninitialised !== : 12
Null initialised != : 8
Null initialised !== : 12

Uninitialised != : 9
Uninitialised !== : 12
Null initialised != : 7
Null initialised !== : 13

Uninitialised != : 7
Uninitialised !== : 13
Null initialised != : 8
Null initialised !== : 11

Uninitialised != : 7
Uninitialised !== : 11
Null initialised != : 7
Null initialised !== : 12


was (Author: pete21):
Chrome (60.0.3112.40) , Windows 10:

Uninitialised != : 45
Uninitialised !== : 29
Null initialised != : 20
Null initialised !== : 26

Uninitialised != : 27
Uninitialised !== : 20
Null initialised != : 16
Null initialised !== : 19

Uninitialised != : 30
Uninitialised !== : 19
Null initialised != : 16
Null initialised !== : 20

Uninitialised != : 25
Uninitialised !== : 23
Null initialised != : 16
Null initialised !== : 21

Uninitialised != : 27
Uninitialised !== : 21
Null initialised != : 18
Null initialised !== : 19

Firefox 54.0 (32 bit), Windos 10:

Uninitialised != : 9
Uninitialised !== : 14
Null initialised != : 9
Null initialised !== : 12

Uninitialised != : 10
Uninitialised !== : 14
Null initialised != : 10
Null initialised !== : 14

Uninitialised != : 10
Uninitialised !== : 13
Null initialised != : 10
Null initialised !== : 15

Uninitialised != : 11
Uninitialised !== : 15
Null initialised != : 10
Null initialised !== : 13

Edge, Windows 10:

Uninitialised != : 9
Uninitialised !== : 11
Null initialised != : 11
Null initialised !== : 12

Uninitialised != : 9
Uninitialised !== : 12
Null initialised != : 8
Null initialised !== : 12

Uninitialised != : 9
Uninitialised !== : 12
Null initialised != : 7
Null initialised !== : 13

Uninitialised != : 7
Uninitialised !== : 13
Null initialised != : 8
Null initialised !== : 11

Uninitialised != : 7
Uninitialised !== : 11
Null initialised != : 7
Null initialised !== : 12

> [FlexJS] comparison of objects using non strict inequality or non strict equality is
slow
> -----------------------------------------------------------------------------------------
>
>                 Key: FLEX-35330
>                 URL: https://issues.apache.org/jira/browse/FLEX-35330
>             Project: Apache Flex
>          Issue Type: Bug
>    Affects Versions: Apache FlexJS 0.7.0
>            Reporter: Justin Mclean
>
> Code use to test:
> {code}
> <?xml version="1.0" encoding="utf-8"?>
> <js:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
>                 xmlns:js="library://ns.apache.org/flexjs/basic" applicationComplete="init()">
>     <js:valuesImpl>
>         <js:SimpleCSSValuesImpl/>
>     </js:valuesImpl>
>     <fx:Script><![CDATA[
>             protected function init():void
>             {
>                 var start:Date;
>                 var end:Date;
>                 var took:Number;
>                 var obj1:Object;
>                 var obj2:Object;
>                 var obj3:Object = null;
>                 var obj4:Object = null;
>                 var i:int;
>                 var j:int;
>                 j = 0;
>                 start = new Date();
>                 for (i = 0; i < 1e7; i++) {
>                     if (obj1 != null) {
>                         j++;
>                     }
>                 }
>                 end = new Date();
>                 took = end.getTime() - start.getTime();
>                 trace("Uninitialised != : " + took);
>                 j = 0;
>                 start = new Date();
>                 for (i = 0; i < 1e7; i++) {
>                     if (obj2 !== null) {
>                         j++;
>                     }
>                 }
>                 end = new Date();
>                 took = end.getTime() - start.getTime();
>                 trace("Uninitialised !== : " + took);
>                 j = 0;
>                 start = new Date();
>                 for (i = 0; i < 1e7; i++) {
>                     if (obj3 != null) {
>                         j++;
>                     }
>                 }
>                 end = new Date();
>                 took = end.getTime() - start.getTime();
>                 trace("Null initialised != : " + took);
>                 j = 0;
>                 start = new Date();
>                 for (i = 0; i < 1e7; i++) {
>                     if (obj4 !== undefined) {
>                         j++;
>                     }
>                 }
>                 end = new Date();
>                 took = end.getTime() - start.getTime();
>                 trace("Null initialised !== : " + took);
>             }
>         ]]></fx:Script>
>     <js:initialView>
>         <js:View percentWidth="100" percentHeight="100">
>             <js:Label id="result" />
>         </js:View>
>     </js:initialView>
> </js:Application>
> {code}
> Output of 5 consecutive tests:
> Uninitialised != : 18
> Uninitialised !== : 18
> Null initialised != : 16
> Null initialised !== : 13
> Uninitialised != : 20
> Uninitialised !== : 18
> Null initialised != : 17
> Null initialised !== : 14
> Uninitialised != : 18
> Uninitialised !== : 19
> Null initialised != : 16
> Null initialised !== : 14
> Uninitialised != : 18
> Uninitialised !== : 18
> Null initialised != : 16
> Null initialised !== : 14
> Uninitialised != : 19
> Uninitialised !== : 18
> Null initialised != : 17
> Null initialised !== : 14
> Smaller numbers are faster. Run on Chrome 55 on OSX.
> You can see about a 35% performance increase.
> Note there is also a small performance increase in use non strict inequality and assigning
to null.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message