enso-org / enso

Hybrid visual and textual functional programming.
https://enso.org
Apache License 2.0
7.34k stars 320 forks source link

Migrate `WithWarnings` to use `EnsoHashMap` to speed them up significantly #8682

Closed JaroslavTulach closed 4 weeks ago

JaroslavTulach commented 8 months ago

This is a long time open task that keeps popping up from time to time. For example again in

The task has been hidden as a future checkbox in #5233, but apparently it is so hidden there it deserves its own issue.

WithWarnings uses EconomicMap implementation which (despite its good name) doesn't deliver on it promise as it cannot be partially evaluated and has to be hidden behind @TruffleBoundary. That slows things down by magnitudes as Greg's benchmark also indicate.

Since

there is a better way. Replace EconomicMap with direct use of EnsoHashMap (which is carefully designed to be PE friendly) and things will get lightening fast!

enso-bot[bot] commented 1 month ago

Pavel Marek reports a new STANDUP for today (2024-07-16):

Progress: - Collect profiling from benchmarks to see the real hotspots of WithWarnings.

enso-bot[bot] commented 1 month ago

Pavel Marek reports a new STANDUP for today (2024-07-17):

Progress: - Migrated WithWarnings to use EnsoHashMap, the performance is much worse so far, will investigate closely tomorrow. It should be finished by 2024-07-24.

JaroslavTulach commented 1 month ago

the performance is much worse so far

I cannot say why that's the case. I believe your approach is correct, Pavel.

enso-bot[bot] commented 1 month ago

Pavel Marek reports a new STANDUP for yesterday (2024-07-18):

Progress: - Continue investigation of performance issues on WithWarnings. It should be finished by 2024-07-24.

enso-bot[bot] commented 1 month ago

Pavel Marek reports a new STANDUP for today (2024-07-19):

Progress: - Let's not remove WarningsLibrary now, it would be too much changes at once.

enso-bot[bot] commented 1 month ago

Pavel Marek reports a new STANDUP for today (2024-07-22):

Progress: - Still working on the AppendWarningNode - debugging an issue with more warnings appended than expected. It should be finished by 2024-07-24.

enso-bot[bot] commented 1 month ago

Pavel Marek reports a new STANDUP for today (2024-07-23):

Progress: - Fixed all the tests for the newly introduced AppendWarningNode.

enso-bot[bot] commented 1 month ago

Pavel Marek reports a new STANDUP for today (2024-07-24):

Progress: - Starting to analyze the performance. The warnings benchmark is so far twice as slow as it used to be.

enso-bot[bot] commented 1 month ago

Pavel Marek reports a new STANDUP for today (2024-07-25):

Progress: - reassignments of warnings are the most costly and most frequent operation and they server no purpose, let's remove them.

enso-bot[bot] commented 1 month ago

Pavel Marek reports a new STANDUP for today (2024-07-26):

Progress: - Debugging performance - looking into IGV graphs, experimenting with profiles.

enso-bot[bot] commented 1 month ago

Pavel Marek reports a new STANDUP for today (2024-07-29):

Progress: - Discovered std lib benchmark regression (https://github.com/enso-org/enso/issues/10702)

enso-bot[bot] commented 1 month ago

Pavel Marek reports a new STANDUP for yesterday (2024-07-29):

Progress: - JPMS help on https://github.com/enso-org/enso/pull/10714

enso-bot[bot] commented 1 month ago

Pavel Marek reports a new STANDUP for today (2024-07-31):

Progress: - More JPMS help

enso-bot[bot] commented 1 month ago

Pavel Marek reports a new STANDUP for today (2024-08-05):

Progress: - Finally reveal the worst bottleneck. The benchmark results are now 10x better than on develop.

enso-bot[bot] commented 4 weeks ago

Pavel Marek reports a new STANDUP for today (2024-08-06):

Progress: - Tests seem OK, scheduling benchmarks on this PR and tomorrow, will compare the results. It should be finished by 2024-08-07.