netty5/example
Nikolay Fedorovskikh 4875a2aad4 Immediate caching the strings wrapped to AsciiString
Motivation:
The `AsciiString#toString` method calculate string value and cache it into field. If an `AsciiString` created from the `String` value, we can avoid rebuilding strings if we cache them immediately when creating `AsciiString`. It would be useful for constants strings, which already stored in the JVMs string table, or in cases where an unavoidable `#toString `method call is assumed.

Modifications:
- Add new static method `AsciiString#cache(String)` which save string value into cache field.
- Apply a "benign" data race in the `#hashCode` and `#toString` methods.

Result:
Less memory usage in some `AsciiString` use cases.
2017-08-15 06:22:14 +02:00
..
src/main Immediate caching the strings wrapped to AsciiString 2017-08-15 06:22:14 +02:00
.gitignore [#844] [#867] Add UDT transport 2013-01-07 21:06:22 +01:00
pom.xml [maven-release-plugin] prepare for next development iteration 2017-08-02 12:55:10 +00:00