graalvm / sulong

Obsolete repository. Moved to oracle/graal.
Other
628 stars 63 forks source link

Optimize allocation of uniques regions #851

Closed anatol1234 closed 6 years ago

anatol1234 commented 6 years ago

When running Rust benchmarks on O0 (emitted IR contains many short functions) I measured a significant performance impact caused by allocations of the newly introduced uniques regions. I identified two major factors which should be addressed by this PR:

Resolving unique slots to pointers is already a bit faster compared to allocations via alloca. I don't know if the fact that pointers to unique slots stay valid until the current frame is closed could be exploited to improve the performance further (it would be enough to resolve unique slots once per active stack frame).

rschatz commented 6 years ago

Merged in https://github.com/graalvm/sulong/commit/d62c8578265934aee7d2ed612527db3dffb4382f