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@birdtechnology.net www.birdtechnology.net
squeak-dev@lists.squeakfoundation.org