Avoid boxing in Framing (#1247)
* Fix FramingBenchmark * Add specialized indexOfByte * Rename indexOfByte to indexOf * Add missing @since(1.1.0) and reformat scaladoc * Fix Scala 2.12 ambiguity problem * Inline nextString * Change default ByteString#indexOf to call indexWhere This is always overriden, but I guess it won't hurt to have a default * Remove default indexOf override Calling indexWhere is already the default * Fix MiMa issues
This commit is contained in:
parent
b6f2c5774e
commit
cce5f9b0d9
5 changed files with 318 additions and 11 deletions
|
|
@ -80,7 +80,7 @@ class FramingBenchmark {
|
|||
val frame = List.range(0, messageSize, 1).map(_ => Random.nextPrintableChar()).mkString + "\n"
|
||||
val messageChunk = ByteString(List.range(0, framePerSeq, 1).map(_ => frame).mkString)
|
||||
|
||||
Source
|
||||
flow = Source
|
||||
.fromGraph(new BenchTestSourceSameElement(100000, messageChunk))
|
||||
.via(Framing.delimiter(ByteString("\n"), Int.MaxValue))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue