mbeddr.core
mbeddr.core copied to clipboard
mpsutil.common.graph topological is stable
sorting is maintaining order of equal items (a.k.a. "a stable sorting algorithm")
this would solve Issue 1 of #2139
Before we merge this, apart from fixing the obvious build problem, I will need collect some real world performance numbers on how this impacts performance, especially for interpreters.
sorting the interpreters seems to be the only usage of common.graph from mpsutils. I asked around and didn't hear about any other project using it.
Regarding the perormance of sorting the interpreters: Our largest interpreter is the javainterpreter with around 10 interpreter nodes. So we're talking about performance of sorting 10 items, which shouldn't be of too high impact, I guess. Or are there places where the interpreter is called in such a frequent fashion that this turns relevant?
The java interpreter is a toy example. That's why we need metrics from real world and yes there are places especially when collecting coverage information where hundreds of interpreters are called rapidly.
Oh I see. I didn't know that.
While the sorted version seems slower, most interpreter usecases will anyway use InterpreterEvaluationHelper
which caches the interpreter for a given category hence the sorted evaluators are also cached. From an interpreter point of view I see now reason not to merge this change since the performance impact is not really relevant.
I am closing this PR because the changes were merged but not through this PR.