enso/engine
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
..
language-server Engine should send notification about node status (#3729) 2022-09-28 12:35:12 +00:00
launcher/src Update Scala to 2.13.8 (#3631) 2022-08-08 19:32:55 +00:00
polyglot-api/src Engine should send notification about node status (#3729) 2022-09-28 12:35:12 +00:00
runner Fix repl (#3767) 2022-10-06 19:53:54 +00:00
runner-native/src Duration type is a builtin type (#3759) 2022-10-14 18:08:08 +00:00
runtime 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
runtime-instrument-id-execution/src/main/java/org/enso/interpreter/instrument Engine should send notification about node status (#3729) 2022-09-28 12:35:12 +00:00
runtime-instrument-repl-debugger/src/main/java/org/enso/interpreter/instrument Generate native image for engine-runner (#3638) 2022-09-22 14:45:10 +00:00
runtime-instrument-runtime-server/src/main/java/org/enso/interpreter/instrument Register instruments/language in their own compilation units to fix the sbt build issues (#3509) 2022-06-13 14:09:08 +00:00
runtime-language-epb/src/main/java/org/enso/interpreter/epb Missing foreign language generates proper Enso error. (#3798) 2022-10-17 09:59:31 +00:00
runtime-with-instruments/src/test Fix Warnings visualization (#3754) 2022-10-04 17:27:13 +00:00
README.md Add a markdown style guide (#1022) 2020-07-21 13:59:40 +01:00

The Enso Engine

The Enso engine is the codebase responsible for compiling and executing Enso code, as well as providing language server functionality to users of the language. It is subdivided into two major components:

  • Language Server: The Enso language service.
  • Polyglot API: The truffle-boundary safe API for communication between the language server and the runtime.
  • Runner: The command-line interface for Enso.
  • Runtime: The compiler and interpreter for Enso.