Quoting Niclas Hedhman <[email protected]>:

Two comments only;

1. Object creation is not the only benchmark, is it?
In "real" applications, we often see that the performance is dying in
the hands of other subsystems, such as serialization, I/O,
recursive/complex algorithms and very seldom the management of objects
and method invocations.
I don't recall the exact path that a method takes, but I am pretty
sure it isn't 50 times that of a single call. And that is also hard to
measure, since it is difficult to know when hotspot will and will not
skew benchmark loops by all kind of eliminations...

IIRC, every time composite method is invoked, reflection is used to inject things and then further invoke next method (concern or mixin). I'd say that's quite enough for being 50 times slower than just simply invoking a method on a bare object.

There is some performance test in Qi4j tests, but it measures only creation time of composite vs creation time of bare object (IIRC at some point 400-800 times slower). I don't remember if there was performance test on invoking composite methods vs invoking methods on bare objects, which correspond to same behaviour as composites.


_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to