Skip to content

Improve simulator runtime (stop using String.format and cache coord hashes)

Ghost User requested to merge feature-#279-make-simulator-faster into master

Profiling showed we lose performance by formatting string.Strings are now less nicely formatted, i.e., not rounded.

The strings are visible in the GUI (e.g., Data@ location @ time), they contain long numbers if we don't format them. However, if we want a more performant version that might be tolerable, especially if we don't use the GUI anyway.

It actually seems to slightly improve performance with the real evaluation scenario.

String_Performance

Also I wrote a very simple caching for Coords, this is because the hashes are computed for Hashmaps etc, so they are frequently needed but seldomly changed.

Synchronized lists are replaced by ordinary ArrayLists, since we do not have multiple threads.

Merge request reports

Loading