Implement SWAR indexOf byte search
See original GitHub issueCurrently Netty uses an expensive (GC-wise too) ByteBufUtil::indexOf
implementation based on ByteProcessor.IndexOfProcessor
to save bound-checks to happen: this could be changed into what @richardstartin has implemented on https://richardstartin.github.io/posts/finding-bytes.
Same could be applied to ByteBuf::indexOf
that’s not using ByteBufUtil::indexOf
(!!!)
@normanmaurer Any idea why?
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Finding Bytes in Arrays | Richard Startin's Blog
This post considers the benefits of branch-free algorithms through the lens of a trivial problem: finding the first position of a byte ......
Read more >java - Find indexOf a byte array within another byte array
The simpelst way would be to compare each element: public int indexOf(byte[] outerArray, byte[] smallerArray) { for(int i = 0; ...
Read more >SIMD-friendly algorithms for substring searching
A generic implementation calls a function like memcmp to compare ... This algorithm is suitable for all SIMD instruction sets and also SWAR...
Read more >Best way to search for string in byte array? - Oracle Communities
Just build a String instance with the array of bytes and then use the indexOf method to locate the specific strings : byte[]...
Read more >Richard Startin on Twitter: "You did it. You crazy son of a bitch, you ...
Implement SWAR indexOf byte search by franz1981 · Pull Request #10737 · netty/netty. Motivation: Faster indexOf Modification: Create generic SWAR indexOf ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@chrisvest you should add the test I’ve linked on https://github.com/netty/netty/issues/10731#issuecomment-716315268
Nice article. Maybe @richardstartin would be interested, since he mentioned Netty specifically.