RFR: 8336831: Optimize StringConcatHelper.simpleConcat
Shaojin Wen
duke at openjdk.org
Fri Jul 19 13:31:57 UTC 2024
On Fri, 19 Jul 2024 13:10:43 GMT, Shaojin Wen <duke at openjdk.org> wrote:
> Currently simpleConcat is implemented using mix and prepend, but in this simple scenario, it can be implemented in a simpler way and can improve performance.
Below are the performance numbers running on a MacBook M1 Pro, which is 8.71% faster
-Benchmark (intValue) Mode Cnt Score Error Units
-StringConcat.concatMethodConstString 4711 avgt 15 5.499 ? 0.046 ns/op
+Benchmark (intValue) Mode Cnt Score Error Units
+StringConcat.concatMethodConstString 4711 avgt 15 5.058 ? 0.012 ns/op +8.71%
-------------
PR Comment: https://git.openjdk.org/jdk/pull/20253#issuecomment-2239120831
More information about the core-libs-dev
mailing list