netty5/microbench
Nick Hill 583d838f7c Optimize AbstractByteBuf.getCharSequence() in US_ASCII case (#8392)
* Optimize AbstractByteBuf.getCharSequence() in US_ASCII case

Motivation:

Inspired by https://github.com/netty/netty/pull/8388, I noticed this
simple optimization to avoid char[] allocation (also suggested in a TODO
here).

Modifications:

Return an AsciiString from AbstractByteBuf.getCharSequence() if
requested charset is US_ASCII or ISO_8859_1 (latter thanks to
@Scottmitch's suggestion). Also tweak unit tests not to require Strings
and include a new benchmark to demonstrate the speedup.

Result:

Speed-up of AbstractByteBuf.getCharSequence() in ascii and iso 8859/1
cases
2018-10-26 15:32:38 -07:00
..
src/main Optimize AbstractByteBuf.getCharSequence() in US_ASCII case (#8392) 2018-10-26 15:32:38 -07:00
pom.xml [maven-release-plugin] prepare for next development iteration 2018-09-27 19:00:45 +00:00
README.md Fix wiki link 2014-02-14 12:04:12 -08:00

Microbenchmark tests

See our wiki page.