Naive number questions

Christophe Allegrini christophe.allegrini at birdtechnology.net
Tue Nov 2 23:33:12 UTC 2004


Hello,

This test speed is a part of a larger test to show a collaborative work between Squeak and Java through a new middleware.

By associating Squeak and Java the result is surprising : 317 seconds !

Squeak source code : 
Time millisecondsToRun: [
| bv x |
bv := BirdView new.     "instance create"
bv ipAddress: '127.0.0.1'   ipPort: 2010.    "connection"
bv ltnName: 'ltn_postgresql'.
x := 0.
1000 timesRepeat: [
bv rpcPackage: 'test' rpcClass: 'TestSpeed' rpcMethod: 'iteration' .      "method iteration of java class TestSpeed call by Squeak"
bv rpcEval.
x := x + (bv evalResult at: 1 asInteger) . ] ]

Java Source code : 
public String iteration() {
    long x = 0;
    String value = null;
    for (int i = 0; i < 100000000; i++) {
        x = x + 1;
    }
    value = new Long(x).toString();
    return value;
}

The final goal is to create an opportunity for Squeak to access the domain of Business Application; 
by controlling Java if necessary ( access JDBC, RMI (RPC) ... ) 



Regards,

Christophe Allegrini

email : squeak at birdtechnology.net
www.birdtechnology.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20041103/0cb55240/attachment.htm


More information about the Squeak-dev mailing list