Re: (OT) Direct method calls vs. interfaces

From: Arndt Brenschede (a..iamos.de)
Date: Sat Mar 22 2003 - 13:00:28 EST

  • Next message: Holger Hoffstätte: "Re: (OT) Direct method calls vs. interfaces"

    Holger Hoffstätte wrote:
    > No, we're talking (on my machine) 15 milliseconds vs. ~2 seconds - the
    > interface test takes noticeably longer than the other two. If that is not
    > significant, I don't know what is.

    cool down ... :-)

    That's exactly what I said. 2 seconds / 100 million is
    20 nanos, right?

    An object allocation as well as a synchronized lock is nearly a micro.

    > Of course ... a simple allocation will totally throw this off

    You name it :-)

    > Crap is not excusable just because you don't see it.

    That's where you are wrong. I tried this example,
    and yes, I see a factor ~30 for sun-jdk13 in server mode.
    But what does it mean?
    It means that this VM is able to do the direct call in
    30ms / 100 million = 0.3 nanoseconds - that's faster
    than the clockspeed!
    And you are saying everything else is crap? - come on!

    That's nice research but totally irrelavant in practice.

    The cpu-bottleneck in Cayenne is nothing else but
    object allocation.

    > The differences that can be achieved by microtuning
    > can be _astounding_ and are usually horribly
    > underestimated, even when the obvious strategies
    > (algorithm, hardware..) have been applied.

    I agree you should have the microtuning parameters
    in mind, and this is 20 nanos for an interface call
    and 500 nanos for an object allocation.

    That's all I wanted to say.

    schoene Gruesse,

    Arndt



    This archive was generated by hypermail 2.0.0 : Sat Mar 22 2003 - 12:43:59 EST