You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looking at the code, I see that DominatedUses._compute and Setlet.add are running unoptimized code.
Both account for ~5% of total dart2js compile time, so optimizing the code could net a few percent total gain.
Is there something blocking optimization that we should change?
Thanks for locating this, Stephen! This was the thing I was hunting for the past couple of weeks and I just could not get a grasp on (maybe I was not running dart2js long enough to get a meaningful stack trace).
The underlying bug is misoptimization of monomorphic invocation sites that have type arguments (like cast in Setlet.add). We end up emitting a wrong class check - instead of checking type of the receiver we check type of type arguments - which is always deoptimizes. Which in turn eventually disables optimizations of the method.
Even when dart2js runs for a long time (batch mode), some methods are not optimized
Near the top of the profile you will find something like:
Looking at the code, I see that
DominatedUses._compute
andSetlet.add
are running unoptimized code.Both account for ~5% of total dart2js compile time, so optimizing the code could net a few percent total gain.
Is there something blocking optimization that we should change?
/cc @mraleph @a-siva
The text was updated successfully, but these errors were encountered: