Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4070671

instantiation of multidimensional arrays much slower from JDK 1.0 to 1.1.x

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.1.5
    • 1.1.3
    • hotspot
    • 1.1.5
    • sparc
    • solaris_2.5.1
    • Verified

      I have a program that is using a 3-dimensional array of doubles to hold data
      for an image. For example, a 300x300 pixel image would be a
      double[300][300][3]. (the last dimension holds red-green-blue values.)

      Anyway, the java runtime in 1.1.x is much slower to instantiate this large
      data structure than in the 1.0.x runtime.

      Here's my test code:


        class Test {
          public static void main(String argv[]) {
            double BigVariable[][][];

            BigVariable=new double[300][300][3];
          }
        }

      With the 1.0.2 JDK, the time to run this code is:

      % /usr/bin/time java Test
      real 4.8
      user 4.1
      sys 0.5

      With the 1.1.x JDK (and I've tried both 1.1 and 1.1.3):

      % /usr/bin/time java Test
      real 43.9
      user 42.3
      sys 0.7


      An order of magnitude slower!

            never Tom Rodriguez
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: