Skip to content
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

VM: support passing of unboxed values as arguments #33549

Open
alexmarkov opened this issue Jun 20, 2018 · 1 comment
Open

VM: support passing of unboxed values as arguments #33549

alexmarkov opened this issue Jun 20, 2018 · 1 comment
Assignees
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. type-performance Issue relates to performance or code size vm-aot-code-size Related to improvements in AOT code size

Comments

@alexmarkov
Copy link
Contributor

In certain cases it would be more efficient to pass unboxed values (ints, doubles) to Dart functions and runtime entries.

After this support is implemented we can clean up Thread::unboxed_int64_runtime_arg_.

/cc @mraleph

@alexmarkov alexmarkov added the area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. label Jun 20, 2018
@sjindel-google sjindel-google added type-performance Issue relates to performance or code size vm-aot-code-size Related to improvements in AOT code size labels Jan 10, 2020
@sjindel-google
Copy link
Contributor

/cc @victoragnez Interested in looking at this after unboxed fields?

dart-bot pushed a commit that referenced this issue Mar 5, 2020
Static methods and constructors may receive unboxed parameters.
This change adds a bitmap to the RawFunction object indicating
which parameters are unboxed and their types. Also, the stack frame
bitmap was updated to include new bits for those parameters.

The ArgumentsDescriptor object was updated to store not only the number
of arguments, but also their size, since 32-bit platforms would use two
words for each int64 and double value.

In addition, static methods that return non-nullable integers
and doubles may return these values unboxed.

Dart AOT x64:

TypedData.Uint8ClampedListViewVarBench  +11.73%
DeltaBlue                               +9.32%
Meteor (Intel Xeon)                     +4.64%

Flutter release android-armv8:

velocity_tracker_bench                  -2.32% (less is better)

flutter_gallery_readonlydata_size       +0.18%
flutter_gallery_total_size              +0.13%
flutter_gallery_instructions_size       +0.12%

Issue #33549

Change-Id: I97e310f8f30213920af2333fbdedf193d03db5c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135313
Commit-Queue: Victor Agnez Lima <victoragnez@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
dart-bot pushed a commit that referenced this issue Mar 6, 2020
In order to have instance calls with unboxed parameters, all
the possible targets need to be able to those parameters unboxed.
Then, the methods were partitioned according to the class hierarchy,
and the inferred types from TFA are used to determine the parameters
that could be unboxed.

This is done for non-nullable integer and double parameters, and
return value.

dart-aot linux x64:

Bench2D                8.028%
DeltaBlue              4.688%
ParticleSystemPaint    27.79%

Flutter release android-armv8:

velocity_tracker_bench -2.026% (less is better)

flutter_gallery_total_size -0.1460%
flutter_gallery_instructions_size -0.2715%
flutter_gallery_readonlydata_size 0.0539%

Issue #33549

Change-Id: Iedd9b4321c3d78b406ea1708e15c747754433027
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138501
Commit-Queue: Victor Agnez Lima <victoragnez@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
dart-bot pushed a commit that referenced this issue Mar 10, 2020
Issue #33549

Change-Id: Ib1c040390d4de9a00a2a1ed3ae42bb1aa10456a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138922
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. type-performance Issue relates to performance or code size vm-aot-code-size Related to improvements in AOT code size
Projects
None yet
Development

No branches or pull requests

3 participants