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
The example at the bottom of this issue (which was reduced from a real world example, without needing --no-background-compilation --enable-inlining-annotations) had orders of magnitude regression:
% out/ReleaseX64/dart --enable-inlining-annotations --no-background-compilation test.dart
Took 0:00:16.288135
% out/ReleaseX64/dart --no-preview-dart-2 --enable-inlining-annotations --no-background-compilation test.dart
Took 0:00:00.090875
This is a slowdown of 180 x!
main() {
final closure =outer<int, int>();
final sw =newStopwatch()..start();
for (int i =0; i <10000000; ++i) {
fooClosure(closure);
}
print('Took ${sw.elapsed}');
}
finaldynamic fooClosure = foo;
@NeverInlinefoo(FI arg) { }
BFunction(A) outer<A, B>() {
Binner(A a) =>null;
return inner;
}
typedefFI=intFunction(int);
constNeverInline='NeverInline';
The cause for this slowdown is that we have no fast cases for type tests where the instance tested against is a closure which has a direct or indirect parent function with type parameters.
This is most likely a problem for all users of package:stack_trace on the Dart VM - which is a real problem!
While looking at this I've also discovered a bug in the implementation of function subtyping implementation -- see #34051 .
I've started working on this now.
The text was updated successfully, but these errors were encountered:
mkustermann
added
the
area-vm
Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.
label
Aug 1, 2018
This performance issue is a reproduction of the issue the pub site has on Dart 2 and was fixed in 575a8f8. So you could try to switch to a Dart 2 sdk again and do a load test. That being said, JIT in Dart 2.0 is still slower than Dart 1.
tekknolagi
pushed a commit
to tekknolagi/dart-assembler
that referenced
this issue
Nov 3, 2020
Until now the subtype-test cache mechanism did not work (i.e. could
return the wrong result) for partially instantiated generic closures.
Additionally, closures which close over generic methods were always
handled in runtime. This caused a servere performance regression for
any code hitting this (e.g. code which uses `package:stack_trace`).
Fixesdart-lang#34051Fixesdart-lang#34054
Change-Id: Idb73e6f348c2fe0c737f42c57009f5f7a636c9a6
Reviewed-on: https://dart-review.googlesource.com/68369
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
The example at the bottom of this issue (which was reduced from a real world example, without needing
--no-background-compilation --enable-inlining-annotations
) had orders of magnitude regression:This is a slowdown of 180 x!
The cause for this slowdown is that we have no fast cases for type tests where the instance tested against is a closure which has a direct or indirect parent function with type parameters.
This is most likely a problem for all users of
package:stack_trace
on the Dart VM - which is a real problem!While looking at this I've also discovered a bug in the implementation of function subtyping implementation -- see #34051 .
I've started working on this now.
The text was updated successfully, but these errors were encountered: