arturobernalg opened a new pull request, #1159: URL: https://github.com/apache/tomcat/pull/1159
Fixes https://bz.apache.org/bugzilla/show_bug.cgi?id=69552 toBytes() creates a CharsetEncoder on every call. For UTF-8 and an ASCII value the bytes are the characters, so the encoder is skipped. Other charsets and non-ASCII values follow the existing path, including the REPORT error handling. JMH, JDK 21, UTF-8 (ns/op, B/op): ASCII String 105 -> 22 and 280 -> 64, ASCII char[] 112 -> 25 and 280 -> 64, non-ASCII String 118 -> 122 and 264 -> 264. The benchmark and the raw output: https://github.com/arturobernalg/tomcat/tree/messagebytes-tobytes-benchmark/benchmarks/messagebytes-tobytes -- 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]
