rudygt opened a new pull request, #437: URL: https://github.com/apache/incubator-tuweni/pull/437
<!-- Thanks for sending a pull request! Please check out our contribution guidelines: --> <!-- https://github.com/apache/incubator-tuweni/blob/main/CONTRIBUTING.md --> ## faster hex string to bytes conversions Hello, I found a couple of tweaks for the conversions from bytes to hexadecimal strings and vice versa. from the numbers I get on my machine (ryzen 5900x) * from bytes to hex string at least 2x better * from hex string to bytes at least 2x better I have a branch in my fork with the benchmarks if anyone wants to compare the numbers on different cpus, they can be run with './gradlew jmh' [https://github.com/rudygt/incubator-tuweni/tree/benchmarks](url) pd: do we have any project/benchmark already in the repo where the improvements in the bytes package could be seen? (tying to find out how these changes help/hurt real use cases) Thanks! ## micro benchmark results (the changes in this pull request come from the candidate methods) ``` Benchmark Mode Cnt Score Error Units BasicBenchmark.toHexByteBufferCandidate thrpt 2 7409.498 ops/s BasicBenchmark.toHexCandidate thrpt 2 11958.619 ops/s BasicBenchmark.toHexOriginal thrpt 2 4334.624 ops/s FromHexBenchmark.fromHexCandidate thrpt 2 14410.351 ops/s FromHexBenchmark.fromHexOriginal thrpt 2 6172.697 ops/s ShortHexBenchmark.toEllipsisHexStringCandidate thrpt 2 59985.673 ops/s ShortHexBenchmark.toEllipsisHexStringOriginal thrpt 2 40314.218 ops/s ``` -- 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: dev-unsubscr...@tuweni.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tuweni.apache.org For additional commands, e-mail: dev-h...@tuweni.apache.org