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

(bf) View-buffer bulk get/put operations are slow

    Details

    • Subcomponent:
    • Resolved In Build:
      01
    • CPU:
      x86, sparc
    • OS:
      solaris_8, windows_nt, windows_2000

      Backports

        Description


        ingrid.yao@Eng 2001-05-24


        J2SE Version (please include all output from java -version flag):

            java version "1.4.0-beta"
            Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta-b64)
            Java HotSpot(TM) Client VM (build 1.4.0-beta-b64, mixed mode)

        Does this problem occur on J2SE 1.3? Yes / No (pick one)

            No

        Operating System Configuration Information (be specific):

              Win 2000 5.00.2195 Service pack 1

        Hardware Configuration Information (be specific):

             x86 Family 6 Model 7 Stepping 3

        Bug Description:

             bulk transfer (using eg DoubleBuffer) are 2-3 times slower
             than element access. should be otherway around.

        Test programs: (see attachments)
            4 files - readNIOSmap.java, readNIOSmapBulk.java, writeNIOSmap.java
                      and writeNIOSmapBulk.java

        Test result:

          The slowdown doesnt effect writing until size ~ 1M elements. reading
          is about twice as slow on 10K elements, a bit slower on 1M. It only
          is a problem when n is large, but that is when you hope bulk transfers
          would speed things up.

          n=10,000:

           write NIO Stream mapped(10000) 0.094 seconds 4.9995E7
           write NIO Stream mapped Bulk(10000) 0.031 seconds 4.9995E7
           Read NIO Stream mapped (10000) takes 0.009000000000000001 seconds 4.9995E7
           Read NIO Stream mapped Bulk (10000) takes 0.021 seconds 4.999

          n=100,000:

           write NIO Stream mapped(100000) 0.188 seconds 4.99995E9
           write NIO Stream mapped Bulk(100000) 0.14100000000000001 seconds 4.99995E9
           Read NIO Stream mapped (100000) takes 0.08600000000000001 seconds 4.99995E9
           Read NIO Stream mapped Bulk (100000) takes 0.20600000000000002 seconds 4.9999

          n=1,000,000:

           write NIO Stream mapped(1000000) 1.0 seconds 4.999995E11
           write NIO Stream mapped Bulk(1000000) 1.218 seconds 4.999995E11
           Read NIO Stream mapped (1000000) takes 0.878 seconds 4.999995E11
           Read NIO Stream mapped Bulk (1000000) takes 2.101 seconds 4.999995

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  iris Iris Clark
                  Reporter:
                  tyao Ting-Yun Ingrid Yao (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported:
                    Indexed: