pjfanning commented on code in PR #2306:
URL: https://github.com/apache/pekko/pull/2306#discussion_r2441722114
##########
actor/src/main/scala/org/apache/pekko/util/ByteString.scala:
##########
@@ -1056,6 +1056,72 @@ sealed abstract class ByteString
*/
def indexOf(elem: Byte): Int = indexOf(elem, 0)
+ override def indexOfSlice[B >: Byte](slice: scala.collection.Seq[B], from:
Int): Int = {
+ // this is only called if the first byte matches, so we can skip that check
+ def check(startPos: Int): Boolean = {
Review Comment:
the 2 check methods are actually different and trying to force the 2 check
methods to be the same will involve casting and that will damage performance -
the type of the slice parameter is different
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]