mirror of
https://github.com/enso-org/enso.git
synced 2024-12-25 10:22:34 +03:00
6c440beecc
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`. |
||
---|---|---|
.. | ||
data | ||
src | ||
package.yaml | ||
README.md |
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.