Fastpath for new String(bytes..) and String#getBytes(..) for ASCII + ISO-8859-1 (original) (raw)
Tom Hawtin Thomas.Hawtin at Sun.COM
Wed Jun 17 13:06:47 UTC 2009
- Previous message: Fastpath for new String(bytes..) and String#getBytes(..) for ASCII + ISO-8859-1
- Next message: hg: jdk7/tl/jdk: 6570344: Invalid RSA OID in sun.security.x509.AlgorithmId
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Xueming Shen wrote:
I would be very hesitated to add methods with specific encoding names, even these encodings are VERY important, such as ASCII and ISO8859. Hack a fast path in the implementation to boost the performance for some important encodings is something we want to do, but add specific methods into the API is totally different thing.
In my opinion, it makes more sense to add methods to Charset than to String - the latter is easily the more fundamental type. Indeed there are already convenience methods encode/decode for ByteBuffer. Trusted Charset implementations could override and use SharedSecrets or rely upon inlining for fast access to String character data.
Tom
- Previous message: Fastpath for new String(bytes..) and String#getBytes(..) for ASCII + ISO-8859-1
- Next message: hg: jdk7/tl/jdk: 6570344: Invalid RSA OID in sun.security.x509.AlgorithmId
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]