Hi, Frederic, On Mon, 27 Sep 2004 22:05:37 +0200 Fr�d�ric Delanoy <[EMAIL PROTECTED]> wrote:
> Initialization time : similars > Chain looping : 0.2654 > Vector looping : 0.8733 > ArrayList looping : 0.721 > LinkedList looping : 0.0961 I did some performance tests this morning (see attachment), and it seems that Chain and LinkedList are rather equal - they both win or lose depending on the JVM. So one question is whether the advantage of using a standard data container is worth the effort. Another question is what bad things eclipse does with my jdk, as the timing there (on the same machine) is: Looping through the chain took 0.7743 Looping through the vector took 7.75 Looping through the arraylist took 14.1082 Looping through the linked list took 3.3195 HTH, Markus -- markus schaber | dipl. informatiker logi-track ag | rennweg 14-16 | ch 8001 z�rich phone +41-43-888 62 52 | fax +41-43-888 62 53 mailto:[EMAIL PROTECTED] | www.logi-track.com
--- Tested: java-sablevm SableVM version 1.1.6 - compile date and time: 2004-08-24 00:52:52 UTC - gcc version: 3.3.4 (Debian 1:3.3.4-9) - 'real life brokenness' features enabled - signal based exception detection - copying garbage collection - bidirectional object layout - inline-threaded interpreter Initializing the vector took 0.0 Initializing the array list took 0.0 Initializing the linked list took 2.0E-4 Initializing the chain took 2.0E-4 Looping through the chain took 0.3924 Looping through the vector took 2.5415 Looping through the arraylist took 2.0259 Looping through the linked list took 0.4523 --- --- Tested: gij-wrapper gij (GNU libgcj) version 3.3.4 (Debian 1:3.3.4-6sarge1) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Initializing the vector took 0.0 Initializing the array list took 0.0 Initializing the linked list took 0.0 Initializing the chain took 0.0 Looping through the chain took 0.5882 Looping through the vector took 2.9258 Looping through the arraylist took 1.8299 Looping through the linked list took 0.2749 --- --- Tested: kaffe Kaffe Virtual Machine Copyright (c) 1996-2004 Kaffe.org project contributors (please see the source code for a full list of contributors). All rights reserved. Portions Copyright (c) 1996-2002 Transvirtual Technologies, Inc. The Kaffe virtual machine is free software, licensed under the terms of the GNU General Public License. Kaffe.org is a an independent, free software community project, not directly affiliated with Transvirtual Technologies, Inc. Kaffe is a Trademark of Transvirtual Technologies, Inc. Kaffe comes with ABSOLUTELY NO WARRANTY. Engine: Just-in-time v3 Version: 1.1.x-cvs Java Version: 1.1 Initializing the vector took 0.0 Initializing the array list took 0.0 Initializing the linked list took 1.0E-4 Initializing the chain took 0.0 Looping through the chain took 0.0114 Looping through the vector took 1.0057 Looping through the arraylist took 0.277 Looping through the linked list took 0.0579 --- --- Tested: /usr/local/share/j2sdk1.5.0b3_57/bin/java -server java version "1.5.0-beta3" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta3-b57) Java HotSpot(TM) Server VM (build 1.5.0-beta3-b57, mixed mode) Initializing the vector took 1.0E-4 Initializing the array list took 0.0 Initializing the linked list took 0.0010 Initializing the chain took 1.0E-4 Looping through the chain took 0.0204 Looping through the vector took 0.128 Looping through the arraylist took 0.0394 Looping through the linked list took 0.0066 --- --- Tested: /usr/local/share/j2sdk1.5.0b3_57/bin/java -client java version "1.5.0-beta3" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta3-b57) Java HotSpot(TM) Client VM (build 1.5.0-beta3-b57, mixed mode, sharing) Initializing the vector took 0.0 Initializing the array list took 0.0 Initializing the linked list took 0.0022 Initializing the chain took 3.0E-4 Looping through the chain took 0.0252 Looping through the vector took 0.1734 Looping through the arraylist took 0.1661 Looping through the linked list took 0.0137 --- --- Tested: /usr/local/share/IBMJava2-142/bin/java java version "1.4.2" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2) Classic VM (build 1.4.2, J2RE 1.4.2 IBM build cxia321420-20040626 (JIT enabled: jitc)) Initializing the vector took 0.0 Initializing the array list took 0.0 Initializing the linked list took 2.0E-4 Initializing the chain took 1.0E-4 Looping through the chain took 0.0086 Looping through the vector took 0.157 Looping through the arraylist took 0.0443 Looping through the linked list took 0.0036 --- --- Tested: /usr/local/share/j2sdk1.4.2_04/bin/java -client java version "1.4.2_04" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05) Java HotSpot(TM) Client VM (build 1.4.2_04-b05, mixed mode) Initializing the vector took 0.0 Initializing the array list took 0.0 Initializing the linked list took 7.0E-4 Initializing the chain took 1.0E-4 Looping through the chain took 0.0245 Looping through the vector took 0.2617 Looping through the arraylist took 0.3896 Looping through the linked list took 0.0345 --- --- Tested: /usr/local/share/j2sdk1.4.2_04/bin/java -server java version "1.4.2_04" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05) Java HotSpot(TM) Server VM (build 1.4.2_04-b05, mixed mode) Initializing the vector took 0.0 Initializing the array list took 0.0 Initializing the linked list took 1.0E-4 Initializing the chain took 3.0E-4 Looping through the chain took 0.095 Looping through the vector took 0.195 Looping through the arraylist took 0.083 Looping through the linked list took 0.0071 --- --- Tested: Gcj compiling to machine code gcj (GCC) 3.3.4 (Debian 1:3.3.4-6sarge1) Copyright � 2003 Free Software Foundation, Inc. Dies ist freie Software; die Kopierbedingungen stehen in den Quellen. Es gibt KEINE Garantie; auch nicht f�r VERKAUFBARKEIT oder F�R SPEZIELLE ZWECKE. Initializing the vector took 0.0 Initializing the array list took 0.0 Initializing the linked list took 0.0 Initializing the chain took 0.0 Looping through the chain took 0.0184 Looping through the vector took 1.2738 Looping through the arraylist took 0.2944 Looping through the linked list took 0.0387 ---
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
