[Kde-bindings] Using a custom RealProxy to implement a C# SMOKE adaptor

Marco Ladermann marco.ladermann at gmx.de
Fri Aug 22 11:08:07 UTC 2003


Am Freitag, 22. August 2003 12:32 schrieb Richard Dale:
> I've done a quick comparison of the overhead of a Proxy invocation vs. JNI
> in Java, and the JNI call is about 10x faster. On an 800 MHz iBook, this
> loop with 10 million method calls took 3.5s in JNI against 35s via proxy
> calls:
>
> 		QFont myFont = new QFont();
>
> 		for (int count = 0; count < 5000000; count++) {
> 			myFont.setPointSize(18);
> 			QFont.removeSubstitution("Times Roman");
> 		}
>
> So about 3 million method calls/s vs 0.3 million/s.

Did you take into account that the reflection API was considerably improved in 
Java 1.4.x (see: http://java.sun.com/j2se/1.4.1/docs/guide/reflection/)? If 
your JVM version is 1.3 you might get better results with a more uptodate 
JVM.

Marco
-- 



More information about the Kde-bindings mailing list