-
Bug
-
Resolution: Fixed
-
P4
-
1.4.0
-
01
-
x86, sparc
-
solaris_8, windows_nt, windows_2000
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2044020 | 1.4.1 | Iris Clark | P4 | Resolved | Fixed | hopper |
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
- backported by
-
JDK-2044020 (bf) View-buffer bulk get/put operations are slow
- Resolved
- duplicates
-
JDK-4607114 (bf) java.nio.ByteBuffer.put(byte[]) is too slow
- Closed
-
JDK-4629324 java.nio.MappedByteBuffer is slow
- Closed
- relates to
-
JDK-6525802 server compiler should support certain reflective and data motion intrinsics
- Resolved