flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Mclean <jus...@classsoftware.com>
Subject Re: Private properties are undefined in JS and null in AS
Date Sun, 04 Jun 2017 00:24:05 GMT
Hi,

> I'm not sure it is always one-off.  I think every function call will need
> to initialize its local variables. 

Yep that may also need to be done in some cases.

> Also, we have to remember that the final optimization is done by Google
> and not us.  We are type annotating the output and they and/or the browser
> runtimes may also someday optimize and auto convert "==" to "===" where it
> can.

And it may do further optimisations where you use === rather than ==. Other than hyperticals
do you have any data to show that it does this?

>  So it isn't clear to me that we have to manually go through and
> replace our use of '==‘. 

In a real application making those changes in a small part of the code changed time spent
sorting out css values from 30ms to 5ms. Can you explain why is that is not worth pursuing?

> Something the compiler could do is flag areas in the code where type
> information is lacking.  That kind of thing may have greater impact on the
> final performance.

It may or may not - do you have data showing this?

We have data that clearly shows === and !== are faster than their counterparts. Why would
you not want to use them where it make sense?

I see if I can make some tests around setting to null so we have real data on that.

Thanks,
Justin
Mime
View raw message