This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Another 646 patch and performance comparison with TOWER


>>>>> "Tom" == Tom Tromey <tromey@redhat.com> writes:

Tom> Why doesn't the `646' get turned into `ASCII' in getDecoder?

I tried the appended test.
With this I don't see any attempts to load a converter library.
So I think the 646 is being converted to `ASCII' internally.

I'm using my caching patch plus the small change ("return" -> "result =")
that you recommended.

Tom

public class t
{
  public static void main (String[] args) throws java.io.UnsupportedEncodingException
  {
    for (int i = 0; i < 50; ++i)
      {
	byte[] r = new byte[5];
	r[0] = (byte) 'a';
	r[1] = (byte) 'b';
	r[2] = (byte) 'c';
	r[3] = (byte) 'd';
	r[4] = (byte) 'e';

	String s = new String (r, "646");
	System.out.println (s);
      }
  }
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]