Hi,

> The JS version of the test is here:
> http://home.apache.org/~aharui/FlexJS/FLEX35330/bin/js-release/ 
> <http://home.apache.org/~aharui/FlexJS/FLEX35330/bin/js-release/>
> The SWF version of the test is here:
> http://home.apache.org/~aharui/FlexJS/FLEX35330/bin-debug/
> 
> For me, the SWF version is considerably slower.  The JS version can run a
> test in 200ms that takes Flash 12000ms!

You might want to try a non debug version of the swf.

> And for me, on both SWF and JS, I'm seeing that run as fast or faster for
> "boolean" as using strict equality:
> 
>  if (someObject === true)
> 
> Do others see that?

No but there’s not much in it.

j = 0 if (initialisedBoolean) : 284
j = 0 if (initialisedBoolean == true) : 309
j = 0 if (initialisedBoolean === true) : 276
j = 0 if (initialisedLocalBoolean) : 202
j = 0 if (initialisedLocalBoolean == true) : 233
j = 0 if (initialisedLocalBoolean === true) : 191

I don’t see any tests for uninitialisedBoolean’s and true in there.

>  given that "if (someObject)" doesn't require boolean variable
> initialization

Without initialisation you can get type conversion in some cases and it is 
likely to be slower. Without initialisation you will also still have this issue 
in that (undefined == false) is false which can cause a number of bugs. Code 
like this (someBool == false) and (!someBool) will give different results 
depending if you initialise the boolean to false or not.

> Again, we don't have to all agree.  We can teach the compiler to do
> different things at different points.

Sure.

Thanks,
Justin

Reply via email to