Closed
Description
Christoph Dreis opened SPR-14636 and commented
Hey,
I was doing some benchmarks of StompCommand.getMessageType() in order to improve it a bit. While doing so, I noticed that the underlying map of stomp commands can be turned into an EnumMap.
Benchmark | Mode | Cnt | Score | Error | Units |
---|---|---|---|---|---|
MyBenchmark.getMessageTypeBefore | thrpt | 30 | 163519811,370 | ± 8667018,099 | ops/s |
MyBenchmark.getMessageTypeNew | thrpt | 30 | 222591672,767 | ± 4476266,088 | ops/s |
As you can see there is ~36% performance increase.
Cheers,
Christoph
Affects: 4.2.7, 4.3.2
Reference URL: #1148
Issue Links:
- Improve performance of assertion in StompSubProtocolHandler [SPR-14624] #19191 Improve performance of assertion in StompSubProtocolHandler
Referenced from: commits aa12288, 899ebd8, 8e98177
Backported to: 4.2.8