pjfanning commented on PR #2148: URL: https://github.com/apache/pekko/pull/2148#issuecomment-3262275444
Latest Benchmarks ``` Scala 2.13 with latest SWAR improvements (Java 17.0.16) [info] Benchmark Mode Cnt Score Error Units [info] ByteString_indexOf_Benchmark.bs1_indexOf_from thrpt 3 142007750.335 ± 11451280.353 ops/s [info] ByteString_indexOf_Benchmark.bs1_indexOf_from_byte thrpt 3 201839375.500 ± 8883178.639 ops/s [info] ByteString_indexOf_Benchmark.bss_indexOf_from_best_case thrpt 3 229591381.126 ± 9493019.937 ops/s [info] ByteString_indexOf_Benchmark.bss_indexOf_from_far_index_case thrpt 3 19255457.957 ± 1756254.380 ops/s [info] ByteString_indexOf_Benchmark.bss_indexOf_from_far_index_case_byte thrpt 3 17272232.840 ± 1025593.701 ops/s [info] ByteString_indexOf_Benchmark.bss_indexOf_from_worst_case thrpt 3 5558092.504 ± 261288.813 ops/s [success] Total time: 529 s (0:08:49.0), completed 6 Sep 2025, 14:50:44 Scala 2.13 with latest SWAR improvements (Java 17.0.16) [info] Benchmark Mode Cnt Score Error Units [info] ByteString_indexOf_Benchmark.bs1_indexOf_from thrpt 3 141756145.114 ± 30369828.227 ops/s [info] ByteString_indexOf_Benchmark.bs1_indexOf_from_byte thrpt 3 144978259.405 ± 28884724.074 ops/s [info] ByteString_indexOf_Benchmark.bss_indexOf_from_best_case thrpt 3 229556876.670 ± 15205367.331 ops/s [info] ByteString_indexOf_Benchmark.bss_indexOf_from_far_index_case thrpt 3 17614264.657 ± 731800.955 ops/s [info] ByteString_indexOf_Benchmark.bss_indexOf_from_far_index_case_byte thrpt 3 17853870.144 ± 179729.781 ops/s [info] ByteString_indexOf_Benchmark.bss_indexOf_from_worst_case thrpt 3 5516083.125 ± 438304.618 ops/s [success] Total time: 553 s (0:09:13.0), completed 6 Sep 2025, 15:05:48 ``` The changes show some promise but I'm concerned about the ByteString_indexOf_Benchmark.bss_indexOf_from_far_index_case_byte case where the performance trails off after a few iterations (the warmup is faster than the recorded runs). @He-Pin if you time, could you retry the benchmark runs on your machine with the latest code in this PR and the main branch. The main change today is that I'm using a VarHandle to fetch long values from the byte array instead of using the code that gets 8 bytes explicitly and that does bitwise manipulations on the bytes. (SWARUtil.getLong). -- 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]
