Conversation
d5c21d2 to
46adf07
Compare
46adf07 to
fab09a7
Compare
add optimised lastIndexOf Update ByteString.scala Update ByteString.scala Update ByteString.scala
fab09a7 to
b5a4ec5
Compare
He-Pin
left a comment
There was a problem hiding this comment.
Good performance improvement for ByteString.lastIndexOf. A few observations:
-
Specialized
Byteoverload: Adding theByte-typed overload (avoiding the[B >: Byte]generic version) is indeed the biggest win since it avoids boxing/unboxing. -
SWAR optimization: The PR mentions it doesn't yet use SWAR (SIMD Within A Register). That would be a nice follow-up for even better performance on longer ByteStrings.
-
Missing JMH benchmark: As noted in the PR body, a JMH benchmark is needed to quantify the improvement. This should be added before merge.
-
Staleness: Open since September 2025 with no reviews yet. The implementation looks solid -- the main gap is the benchmark. @pjfanning would you like to finish this up?
|
going with #2838 |
[B >: Byte]versions is the biggest win