Re: [tcljava-user] Tclblend performance
Brought to you by:
mdejong
From: D. J. H. <dha...@mi...> - 2002-01-03 16:04:15
|
On Thu, 3 Jan 2002, Klara Ward wrote: > Is running java through tclblend slower that pure java, and if so, how much? The tclblend <-> java connection is done through reflection and JNI and thus has the overhead of those API's. I've heard figures like a method call through reflection is 10-20x slower than a normal Java method call. The way to work around this problem, then, is to reduce the number of calls across the Tcl/Java interface -- in other words call a fairly coarse-grained Java method that does a lot of work rather than making lots of little method calls. Of course, this is easily measurable -- just write a Tcl script that times a couple hundred thousand method calls to a Java object, then write a little Java program that does the same, and compare the times. -=- D. J. |