JAVA-5789 Implements batch ByteBuf::indexOf#1630
JAVA-5789 Implements batch ByteBuf::indexOf#1630franz1981 wants to merge 2 commits intomongodb:mainfrom
Conversation
|
Similarly to #1629 this have some large performance impact to existing users 🙏 |
|
Hi @franz1981, As replied on the associated ticket JAVA-5789, thank you again for your contribution and for taking the time to explore performance improvements. I really liked your suggestion and the direction it suggested. However, we ended up implementing an alternative SWAR-based solution as part of JAVA-5842. This approach resulted in approximately ~10% better performance according to our benchmarks. For reference, our benchmarks are based on the framework described in the benchmarking specification and implemented in the driver-benchmarks module. Given this, I’ll go ahead and close this PR as superseded by the implementation in JAVA-5842. |
|
Hi @vbabanin I've taken a quick look at the SWAR approach you used there and it is sounds - but for the Netty use case I still suggest to leverage what is offered by ByteBuf::indexOf since within Netty I could have used bound and accessibility check free (and without position change too!) getLong - which directly become as simple as a "mov" in x86. Said that, many thanks for the consideration and keep the good work ❤️ |
Fixes JAVA-5789