enso/test
Hubert Plociniczak 6c440beecc
Move logic calculating the index in Vector.at to a builtin method to make the performance of Vector to be on par with Array (#3811)
The main culprit of a Vector slowdown (when compared to Array) was the normalization of the index when accessing the elements. Turns out that the Graal was very persistent on **not** inlining that particular fragment and that was degrading the results in benchmarks.

Being unable to force it to do it (looks like a combination of thunk execution and another layer of indirection) we resorted to just moving the normalization to the builtin method. That makes Array and Vector perform roughly the same.

Moved all handling of invalid index into the builtin as well, simplifying the Enso implementation. This also meant that `Vector.unsafe_at` is now obsolete.
Additionally, added support for negative indices in Array, to behave in the same way as for Vector.

# Important Notes
Note that this workaround only addresses this particular perf issue. I'm pretty sure we will have more of such scenarios.
Before the change `averageOverVector` benchmark averaged around `0.033 ms/op` now it does consistently `0.016 ms/op`, similarly to `averageOverArray`.
2022-10-20 12:50:44 +00:00
..
Benchmarks Tidy up the remaining ones except Base... (#3797) 2022-10-17 11:27:27 +00:00
Examples_Tests Tidy up the remaining ones except Base... (#3797) 2022-10-17 11:27:27 +00:00
Geo_Tests Tidy up the remaining ones except Base... (#3797) 2022-10-17 11:27:27 +00:00
Google_Api_Test Tidy up the remaining ones except Base... (#3797) 2022-10-17 11:27:27 +00:00
Image_Tests Tidy up the remaining ones except Base... (#3797) 2022-10-17 11:27:27 +00:00
micro-distribution Fix Warnings visualization (#3754) 2022-10-04 17:27:13 +00:00
Table_Tests Add support for Blank_Columns to Table and Database (#3812) 2022-10-20 09:11:08 +00:00
Tests Move logic calculating the index in Vector.at to a builtin method to make the performance of Vector to be on par with Array (#3811) 2022-10-20 12:50:44 +00:00
Visualization_Tests Tidy up the remaining ones except Base... (#3797) 2022-10-17 11:27:27 +00:00