Skip to content

Float32x4 GC mitigation needed! #46187

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

Closed
gmpassos opened this issue May 29, 2021 · 3 comments
Closed

Float32x4 GC mitigation needed! #46187

gmpassos opened this issue May 29, 2021 · 3 comments
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

Comments

@gmpassos
Copy link
Contributor

gmpassos commented May 29, 2021

Float32x4 and Int32x4 brings SIMD acceleration, replacing use of normal numbers (double & int) to a lane of 4 numbers.

One side effect of Float32x4 and Int32x4 is the increase of objects to be handled by GC.

Some strategy in the VM implementation of Float32x4 and Int32x4 is needed to reduce GC work. It seems that other
types, likeString, have a better performance.

@mraleph mraleph added 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 needs-info We need additional information from the issue author (auto-closed after 14 days if no response) labels May 30, 2021
@mraleph
Copy link
Member

mraleph commented May 30, 2021

@gmpassos could you provide some runnable code and instructions for us to run/benchmark/profile ourselves?

In general most local allocations of SIMD values should be eliminated, but SIMD values still need to be boxed when passed around. It is possible to give SIMD values similar treatment as (non-nullable) double type - which we unbox in AOT mode in most places. However it would require language team decision on #43255 - to allow VM erase identity of SIMD values.

@gmpassos
Copy link
Contributor Author

gmpassos commented May 30, 2021

I have worked to show that in the last days:

https://github.com/eneural-net/eneural_net_dart/blob/master/example/eneural_net_benchmark_activation_functions.dart

This benchmark is only testing the activation function.

See how the Hertz decreases as memory is being filled.

You can teste with only "ActivationFunctionSigmoid" in the list (line 10).

@no-response no-response bot removed the needs-info We need additional information from the issue author (auto-closed after 14 days if no response) label May 30, 2021
@gmpassos
Copy link
Contributor Author

@mraleph FYI: #47488

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
Projects
None yet
Development

No branches or pull requests

2 participants