From: Carlos Q. <car...@we...> - 2001-10-04 17:48:47
|
On Thursday 04 October 2001 11:42, Bill Kelly wrote: Thanks Bill for your detailed explanation. > Okay. So there's a point I'm trying to get to about the ratio > of jython-to-java, or rather, the percentage or degree to > which a bunch of jython code relies heavily on calls to Java > classes to do much of its work - sort of a 'glue' or scripting > for the Java components, to put them together and get them to > do things; vs. jython code implementing an algorithm strictly > in pure jython. I think our layout engine falls squarely in > the latter category, while our parser falls to a degree toward > the former; . . . well anyway, here are some numbers :) This is funny, Java is becoming the equivalent to native here ;-) > Anyway here's the java reimplementation (port really) of > the layout engine (again on the GHz athlon) > > layout x 1000: 8.332000017166138 secs (0.008332000017166137/per) > > Zoom! Not quite two orders of magnitude but, just about > one-and-a-half . . . > > But, again, what we're doing in the layout engine - 'pure' > jython, no Java methods called at all, really, 'cept, well > okay stringWidth() from FontMetrics, not much else - is > about as biased an example toward the poor-performance > end of the spectrum as one can get. We're quite happy > with the performance of the rest of our jython modules, > including the parser - and the ones that do things like > glue swing components together - I mean, speed just hasn't > been a problem for those kinds of modules. Could you somehow isolate some hotspot there? It could be interesting to profile it with some tool (OptimizeIt comes to my mind) which can show where most of the time is being spent. Maybe it is possible to either optimize your code, or even better, optimize jython. In many cases some minor fixes are enough > So I didn't want to sound in any of this like I'm down on > jython or anything. I love it actually, it's the best > alternative to Java going right now ! O:-) You bet!!! |