enso/test/Tests
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
..
data Add Text.write Function (#3518) 2022-06-13 09:11:46 +00:00
src 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
package.yaml Import syntax including namespace (#1806) 2021-06-24 12:42:24 +02:00
README.md Allow trailing space in ENSO_HTTP_TEST_HTTPBIN_URL URL. (#3500) 2022-06-01 10:32:03 +03:00

This is a set of tests for the Base library for Enso.

The run test suite for the HTTP component requires an active httbin server on the localhost. If it is present, the port it listens to should be provided by setting the ENSO_HTTP_TEST_HTTPBIN_URL environment variable to a value like http://localhost:8080. The URL may contain a trailing slash.