Serialized Java with regard to Siebel

In running the Java code below on a Solaris 10 based V890 I see the CPU the process gets ramp up very slowly so the process takes a long time to complete. We are working on moving our Siebel environment from windoze to Solaris and this apparent "slowness" is becoming problematic to Siebel 8. Has anybody else run across something similar?Thanks in advance.

import java.io.*;

import java.util.*;

public class TestCPU {

public void testCPUDriver() {

boolean match;

try {

System.out.println("Starting testCPUDriver...");

long duration = System.currentTimeMillis();

/***

for (long i = 0; i < 1000; i++) {

for (long j = 0; j < 1000; j++) {

for (long k = 0; k < 5000; k++) {

}

}

}

***/

for (long i = 0; i < 5000; i++) {

for (long j = 0; j < 5000; j++) {

for (long k = 0; k < 5000; k++) {

}

}

}

duration = System.currentTimeMillis() - duration;

System.out.println("Duration:" + duration + " milliseconds");

System.out.println("Completed testCPUDriver...");

}

catch (Exception ex) {

ex.printStackTrace();

}

}

public static void main(String[] args) {

TestCPU sf = new TestCPU();

sf.testCPUDriver();

}

}

[1329 byte] By [vinman6967a] at [2007-11-27 11:12:23]
# 1

It is like your asking me why your car is suddenly slowing down after changing the tiers.

anyway your loop could be optmized a little bit (at least if the order of i,j and k is not of importance :)

for (long i = 1000l; i > 0; i--) {

for (long j = 1000l; j > 0; j--) {

for (long k = 5000; k > 0 ; k--) {

}

}

}

this is because tests on zeros are compiled to a single instruction whereas other tests need at least one extra instruction to push the value onto the stack.

DikkeDouwea at 2007-7-29 13:54:20 > top of Java-index,Core,Core APIs...