On 10 Apr 2014, at 11:03, Ulf Zibis <ulf.zi...@cosoco.de> wrote:

> Hi Chris,
> 
> Am 10.04.2014 11:04, schrieb Chris Hegarty:
>> Trivially, you could ( but of not have to ) use 
>> java.nio.charset.StandardCharsets.ISO_8859_1 to avoid the cost of String to 
>> CharSet lookup.
> 
> In earlier tests Sherman and I have found out, that the cost of 
> initialization of a new charsets object is higher than the lookup of an 
> existing object in the cache.
> And it's even better to use the same String instance for the lookup which was 
> used to cache the charset.

Interesting… thanks for let me know.  Presumably, there is an assumption is 
StandardCharsets is not initialized elsewhere, by another dependency. 

-Chris.

> 
> -Ulf
> 

Reply via email to