Skip to content
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

Utilize ByteBuf#indexOf #13974

Merged
merged 1 commit into from
Apr 15, 2024
Merged

Conversation

jchrys
Copy link
Contributor

@jchrys jchrys commented Apr 13, 2024

Motivation:
ByteBuf#indexOf employees advanced algorithm to search a given byte.

Modification:
Utilize ByteBuf#indexOf instead forEachByte.

Result:
Better performance.

@jchrys
Copy link
Contributor Author

jchrys commented Apr 13, 2024

Currently, in Netty5 and 4.1, we provide public IndexOfProcessor class and few instances, but it does not perform as quickly as ByteBuf,Buffer#indexOf,bytesBefore. I think we need to address it.

@jchrys jchrys force-pushed the 4.1-discourage-indexOfrocessor branch from 7762b1a to a2b4fb4 Compare April 13, 2024 05:04
Motivation:
`ByteBuf#indexOf` employees advanced algorithm to search a given byte.

Modification:
Utilize `ByteBuf#indexOf` instead `forEachByte`.

Result:
Better performance.
@jchrys jchrys force-pushed the 4.1-discourage-indexOfrocessor branch from a2b4fb4 to 0a05033 Compare April 13, 2024 05:21
@normanmaurer normanmaurer merged commit b9af2e6 into netty:4.1 Apr 15, 2024
11 of 16 checks passed
@normanmaurer
Copy link
Member

@jchrys please port to main as well and open a PR

@normanmaurer normanmaurer added this to the 4.1.109.Final milestone Apr 15, 2024
@jchrys jchrys deleted the 4.1-discourage-indexOfrocessor branch April 15, 2024 06:35
@jchrys
Copy link
Contributor Author

jchrys commented Apr 15, 2024

Sure! Let me check :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants