-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[incubator-kie-issues#83] Refactor InfixOpNode inside DMN core #5621
Conversation
Benchmark comparison using FEELInfixOpBenchmark After merge |
Thank you for sharing these results! (for these cases it's the CompiledButInterpreted subset of the variants as it's the default case for Interpreted at Runtime) If that helps however, sometimes this preliminary conclusion is actually no-longer-true if you are able to push down the uncertainty error; for instance by running the benchmark for longer, or providing additional benchmark cases, etc. |
HI @tarilabs , thanks for help!
Could you please share them on the benchmark PR ? @mariofusco @tarilabs @baldimir
Compared with the "if" choice, I'm pretty sure that the second point is more expensive, but removing that "if" was one of the goal: do you have some idea/suggestion for a more efficient implementation ? |
CompiledButInterpreted is usually your "non-negotiable", because is the one where you have a DMN engine at runtime initialized with a DMN model, and you evaluate multiple times that DMN model with different set of inputs. So it's the one you typically exercise the most on the field. The [fully] Interpreted have a play with the KIE Sandbox style of interacting with the engine, because every time with JIT DMN you compile the .dmn and evaluate with the inputs (on a tangent here we experimented with Caffeine to cache the result in JIT DMN so that if you are testing the same DMN model, you don't need to recompile it, but unf. it was still an experimental extension, not sure if this can be revisited now). However the performance of evaluation here are clearly negligible if compared to most time is typically compiling the model. The CompiledJava kicks in only if you are emitting the compilation and using that (not the default, see comment here). I would also suggest to take a look at algebric expression benchmarks (iirc we had a few) so to have a more "macro"-benchmark for reference in this scope? Hope this helps! |
@gitgabrio Personally I don't have a strong opinion on which of the 2 versions is more readable or maintainable, it is really a matter of tastes and I don't want to argue on them. Regarding the performances, if we're serious about them my suggestion is not only benchmarking more extensively the effects of this change, as also asked by @tarilabs, but also running some proper profiling sessions to better figure out where we are consuming time and how we can improve. For instance I have the feeling that creating a new instance of that |
@mariofusco |
@gitgabrio @tarilabs @baldimir I'm sorry but I did some very preliminary checks and it seems that this commit is worsen performances of 2x if not more, at least in CompiledButInterpreted use case. In fact as I reported here the original benchmark was flawed. I created another, simplistic but more correct benchmark like the following:
If I run this benchmark against 8.44.0.Final I get the following results:
while doing the same on the latest snapshot which includes this change I get:
This definitively deserves more investigation and a proper profiling session (I'm willing to help with this), but either we find a way to restore the former performance levels or I strongly suggest to revert this commit before the deployment of the next stable release. |
@mariofusco |
…e#5621) * [incubator-kie-issues#83] WIP - Splitting structur and behaviour. Tests failing * [incubator-kie-issues#83] Working status. Same single test failing as in main * [incubator-kie-issues#83] Cleanup * [incubator-kie-issues#83] DivExecutor * [incubator-kie-issues#83] AddExecutor * [incubator-kie-issues#83] MultExecutor * [incubator-kie-issues#83] SubExecutor * [incubator-kie-issues#83] Fix DMNRuntimeListenerTest * [incubator-kie-issues#83] Fix as per PR review * [incubator-kie-issues#83] Remove duplicated code * [incubator-kie-issues#83] Renaming as per PR review --------- Co-authored-by: BAMOE CI <bamoe.ci@ibm.com>
Fixes apache/incubator-kie-issues#83
This PR:
InfixOpNode
InfixOperator
and specificInfixExecutor
sif
logic withClassIdentifierTuple -> BiFunction
mapping