harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vera Petrashkova (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-3842) [classlib][io][perf] CharArrayWriter.write(int) method works slowly
Date Fri, 11 May 2007 12:00:21 GMT
[classlib][io][perf] CharArrayWriter.write(int) method works slowly
-------------------------------------------------------------------

                 Key: HARMONY-3842
                 URL: https://issues.apache.org/jira/browse/HARMONY-3842
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
         Environment: Windows and Linux
            Reporter: Vera Petrashkova
            Priority: Minor


The following test demonstrates that CharArrayWriter.write(int) on DRLVM works slower than
on RI.
It is needed 
--------------CharArrayWriterTest.java-------------------
import java.io.*;

public class CharArrayWriterTest {

   public static void main (String[] args) {  
        int size = 100000;   
        try {        
            long startTime = System.currentTimeMillis();
            CharArrayWriter ww = new CharArrayWriter();
            for (int i = 0; i < size; i++) {
                ww.write(i);
                if (i % 10000 == 0) {
                    System.err.println("Step: "+i);
                }
            }            
            ww.close();
            long endTime = System.currentTimeMillis();
            System.err.println("Size: " + size+"  time: "+(endTime - startTime));
        } catch (Throwable e) {
             e.printStackTrace();
        }
    }
  
}
-----------------------------------------
Output on Linux:
==============
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Server VM (build 1.5.0_06-b05, mixed mode)
 
Step: 0
Step: 10000
Step: 20000
Step: 30000
Step: 40000
Step: 50000
Step: 60000
Step: 70000
Step: 80000
Step: 90000
Size: 100000  time: 40

Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors,
as applicable.
java version "1.5.0" 
pre-alpha : not complete or compatible
svn = r536744, (May 10 2007), Linux/ia32/gcc 3.3.3, release build
http://incubator.apache.org/harmony
Step: 0
Step: 10000
Step: 20000
Step: 30000
Step: 40000
Step: 50000
Step: 60000
Step: 70000
Step: 80000
Step: 90000
Size: 100000  time: 7360

Output on Windows:
===================
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)

Step: 0
Step: 10000
Step: 20000
Step: 30000
Step: 40000
Step: 50000
Step: 60000
Step: 70000
Step: 80000
Step: 90000
Size: 100000  time: 15

Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its l
icensors, as applicable.
java version "1.5.0"
pre-alpha : not complete or compatible
svn = r536744, (May 10 2007), Windows/ia32/msvc 1310, release build
http://incubator.apache.org/harmony
Step: 0
Step: 10000
Step: 20000
Step: 30000
Step: 40000
Step: 50000
Step: 60000
Step: 70000
Step: 80000
Step: 90000
Size: 100000  time: 6140

This issue causes the failure of the following test from Stress test suite (http://issues.apache.org/jira/browse/HARMONY-3536)
stress/org/apache/harmony/test/stress/api/java/io/stress/readers/CharArrayReader/CharArrayReaderWriterStressTest





-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message