-
Notifications
You must be signed in to change notification settings - Fork 1.7k
VM: extremely slow 'const' in some cases #2530
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The checked mode gets slower if a vari Set owner to @sgmitrovic. |
Changing the test order to test thing === NEWLINE first recovers the performance. if (thing === NEWLINE) { What this means is that the (x is String) test is very slow - O(100k) instructions when x is some random class. |
Fixed in r6445 Added Fixed label. |
Added Verified label. |
git log --oneline 85bdb898aeb2ac7cea76489ba0bf4e52ff7a79bf..master 04b054b6 Find sdk path with cli_util (#2567) 36c195b9 Only alert about new prereleases for prereleases (#2556) 00b36394 Stop using deprecated mapMap from pkg:collection (#2544) 477cbe72 Improved expectations in flutter_plugin_format validator test (#2532) a8e2442b `pub run` Don't write about precompilation if no terminal is attached (#2531) d83d36a4 Don't precompile dependencies of global activate from path (#2530) 870f395c Sanitize git cache folder names (#2522) 03b7f9a5 Avoid divisive terms (#2523) b239ada4 Remove divisive term (#2517) Change-Id: I55ea52a86121a382dca5c0f85addd4513ada50bf Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154940 Reviewed-by: Jonas Jensen <[email protected]> Commit-Queue: Sigurd Meldgaard <[email protected]>
A simple looking use of 'const' causes run time to nearly double.
Repro: https://chromiumcodereview.appspot.com/10060002/
Time before:
Started
Compiling minfrog on Dart VM took 11.8 seconds in checked mode + compile all
Compiling minfrog on Dart VM took 1.8 seconds in production mode
./frog/minfrog --out=frog/minfrog frog/minfrog.dart frog/tests/hello.dart
hello world
Bootstrapping minfrog took 3.4 seconds in production mode
Generated production minfrog is 507 kB
Time after:
Started
Compiling minfrog on Dart VM took 19.3 seconds in checked mode + compile all
Compiling minfrog on Dart VM took 3.5 seconds in production mode
./frog/minfrog --out=frog/minfrog frog/minfrog.dart frog/tests/hello.dart
hello world
Bootstrapping minfrog took 3.3 seconds in production mode
Generated production minfrog is 507 kB
The text was updated successfully, but these errors were encountered: