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

Replace reflection calls to accessor within AWT

XMLWordPrintable

    • generic
    • linux

      There are a places in JDK where we use reflection to access private API and they might be replaced with use of accessor inside the private package. Experiments shows that it give better performance.
      Results for JDK 6u4_b07 32bit Windows (mean from 10 runs, 10M iterations each):
      client JIT compiler:
      Accessor: 9.319946s = 100%
      ReflectionAccessor: 18.852525s = 202%
      NativeMultipleAccessor: 14.095550s = 151%
      NativeSingleAccessor: 17.144522s = 184%

      server JIT compiler:
      Accessor: 7.610554s = 100%
      ReflectionAccessor: 8.581948s = 113%
      NativeMultipleAccessor: 11.355820s = 149%
      NativeSingleAccessor: 13.020513s = 171%

      Linux x64 results:
          pkg.pkg2.Accessor: 100%
          static java getters pkg.pkg2.ReflectionAccessor: 157 %
          reflection pkg.pkg2.NativeMultipleAccessor: 192%
          native getters through JNI_getFieldValue
          pkg.pkg2.NativeSingleAccessor: 242%
          single native getter which returns multiple field values as an array

            Unassigned Unassigned
            dav Andrei Dmitriev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: