-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Dart AOT performance issue #37455
Comments
Thank you for the detailed bug report and the reproduction. It is known that depending on the work-load AOT might exhibit worse (sometimes much worse) performance characteristics than JIT. I did a quick look and I think ultimately there are few reasons why AOT version is slower:
@override
void call(Tape tape) {
while (tape.current > 0) {
ops.forEach((op) => op(tape));
}
}
/cc @mkustermann |
I can confirm that type of However, in this particular case result type of |
In general case, TFA approximates results of recursive calls using static types. However, if result type of a function does not depend on the flow inside its body, it cannot change and it can be used in case of recursive calls instead of a static type. This improves micro-benchmark from #37455: Before: 0m11.506s After: 0m7.324s Issue: #37455 Change-Id: I967d7add906c8dbd59dbbea1b993e1b4e1733514 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108500 Commit-Queue: Alexander Markov <[email protected]> Reviewed-by: Martin Kustermann <[email protected]>
dart --version
)Dart VM version: 2.4.0 (Unknown timestamp) on "linux_x64"
Linux renato 4.4.0-154-generic #181-Ubuntu SMP Tue Jun 25 05:29:03 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Sample code
The code I am using to benchmark different Dart compilation modes is a simple brainfuck implementation.
This is the bf program I am using for benchmarking.
When running with
dart
as a script, I get the following output:With
dartaotruntime
:With
dart --snapshot-kind=kernel
:Summary:
It seems that
dartaotruntime
has a performance that's just too far from the alternatives. It might be due to it not having a JIT, as the other options? But still, would be reasonable to make further optimizations to get a more predictable performance, I'd think.BTW: the snapshot performance is amazing, pretty close to Go and Java!
The text was updated successfully, but these errors were encountered: