Fastpath for new String(bytes..) and String#getBytes(..) for ASCII + ISO-8859-1
Ulf.Zibis at gmx.de
Wed Jun 17 05:28:56 PDT 2009
thanks for your answer.
Do you have overseen, that String#getASCIIBytes(..) and
String#getISO8859_1Bytes(..) was only mentioned as *alternative*?
As I agree, adding methods with specific encoding names to API is bad
design, I would prefer method signatures like getBytes(byte buf, byte
This additionally allows 6-bit ASCII de/encoding.
We could additionally provide static constants: MASK_ISO_8859_1,
Imagine, you have very short Strings. Loading/instantiating charset +
de/encoder instances (by name) takes more time than the de/encoding
itself in current implementation. So there should be additional big
performance gain e.g. for CORBA applications.
Am 17.06.2009 04:50, Xueming Shen schrieb:
> 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.
> Ulf Zibis wrote:
>> Hi Sherman, may be you are interested in this bug:
More information about the core-libs-dev