netty5/buffer/src
skyguard1 3273679e5f Use Two way algorithm to optimize ByteBufUtil.indexOf() method (#11367)
Use Two way algorithm to optimize ByteBufUtil.indexOf() method

Motivation:

ByteBufUtil.indexOf can be inefficient for substring search on
ByteBuf, in terms of algorithm complexity (O(needle.readableBytes * haystack.readableBytes)), consider using the Two Way algorithm to optimize the ByteBufUtil.indexOf() method

Modification:

Use the Two Way algorithm to optimize ByteBufUtil.indexOf() method.

Result:

The performance of the ByteBufUtil.indexOf() method is higher than the original implementation
2021-06-28 11:08:23 +02:00
..
main Use Two way algorithm to optimize ByteBufUtil.indexOf() method (#11367) 2021-06-28 11:08:23 +02:00
test/java/io/netty/buffer Use Two way algorithm to optimize ByteBufUtil.indexOf() method (#11367) 2021-06-28 11:08:23 +02:00