Question: "backwards" adressing

Ulf Zibis Ulf.Zibis at
Mon Aug 24 03:40:02 PDT 2009

Hi Christian,

can you give a hint, if following code from Character class is 
potentially slower after hotspot compile as if it would be coded 
"forwards" ?

    static void toSurrogates(int codePoint, char[] dst, int index) {
        // We write elements "backwards" to guarantee all-or-nothing // 
TODO: isn't forward faster ?
        dst[index+1] = lowSurrogate(codePoint);
        dst[index] = highSurrogate(codePoint);



More information about the hotspot-compiler-dev mailing list