On Thu, 13 Jun 2002, Mladen Turk wrote: > > Throughput in rows per second (bigger is better) > JavaRowConsumer 95556 > FineGrainedJNIRowConsumer 64360 > CoarseGrainedJNIRowConsumer 53946 > BytePackedJNIRowConsumer 56328 > SocketRowConsumer 15635 > > Now I've changed the CoarseGrainedJNIRowConsumer to use > GetDirectBufferAddress and I'm getting the following results: > > Throughput in rows per second (bigger is better) > JavaRowConsumer 95263 > FineGrainedJNIRowConsumer 64360 > CoarseGrainedJNIRowConsumer 196949 > BytePackedJNIRowConsumer 55379 > SocketRowConsumer 15399 > > The direct buffer gains high througput simply couse there is no need to > copy the byte arrays. > All that was too suspicious for me, so what I've done is the simplest > posible test, and the results are far from what my expectation was.
Your tests are checking the integer operations of the processor, I don't think the buffer allocation is a big part. At least my run is as expected - the direct buffer is a bit faster, but not by much ( since most time is in the common arithmetic ). But try running again with more loops ( I also had different results when run 10.000 times). I would also make few changes to 'warm' up - the java version has a big benefit from not having to load native .so and prepare the run. Costin -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>