-
Notifications
You must be signed in to change notification settings - Fork 610
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
MessageCracker.xsl
optimization using HashMap
#578
MessageCracker.xsl
optimization using HashMap
#578
Conversation
Following is the JMH benchmarking results. Before:benchmarkCrackingGenerated - use the current MessageCracker.xls generated class Benchmark Mode Cnt Score Error Units After:benchmarkCrackingGenerated - use the new MessageCracker.xls generated class Benchmark Mode Cnt Score Error Units To Reproduce BeforeAfter |
@chrjohn need to check if new code generator for FIX Latest can benefit from this. |
hi, I implemented my version of MessageCracker based on HashMap, and he showed a deterioration in processing speed (~30 ms difference compared to If-Else on one message). The replacement with a Switch turned out to be a little faster (a gain of ~15 ms with the same parameters). Tested on a pre-battle stand (with slightly reduced parameters of the virtual machine and allocated memory), as a result, the implementation on the Switch went to the product stand (three weeks - normal flight) |
@mrFloony thanks for your comment. Are you maybe able to create a benchmark as linked in #578 (comment) or as used in the quickfixj-perf-test module #582 |
hi @mrFloony Can let me know more details about your test. 30ms or 15ms for cracking message seems quiet high. Even the if-else approach is much faster than that. Do you have similar JMH test for this. |
Can let me know more details about this, I should be able to update my test. And also add comparison with switch statement vs hash map also. |
MessageCracker.xsl
optimization using HashMap
Actually this is in a different project which generates the classes from orchestrations: https://github.com/quickfix-j/quickfixj-orchestra/blob/fac2493c93f79e21ffcb3cb67cc25459dc2f467d/quickfixj-from-fix-orchestra-repository/quickfixj-from-fix-orchestra-generator/src/main/java/org/quickfixj/orchestra/CodeGeneratorJ.java#L577 |
Fixes #577