|
From: <bc...@wo...> - 2001-02-15 12:44:45
|
[Andy] >The Jrockit eval version I'm using provides >just 2 files: jrockit.exe and jvm.dll (the simpler, >the better, if you ask me). jrockit.exe >replaces java.exe. > >Running jython I get the following error: > >Traceback (innermost last): > File "d:\Program Files\jython-2.0\Lib\site.py", line 66, in ? >AttributeError: module 'sys' has no attribute 'modules' > >To those knowledgeable perhaps you can tell >in an instant whether the culprit is Jrockit >or possibly something overlooked in Jython? I can't say anything definite based only on this. The sys.modules attribute is found by reflection of the PySystemState class. If that for some reason fails to work on jrockit, very little of jython will work. Try to skip the site.py for now by specifying the -S option. If that allow Jython to start, try to see how much of the java world that is available to jrockit: i:\>jython -S Jython 2.0 on java1.3.0 (JIT: null) >>> import java >>> java.lang.Class.getMethods <java function getMethods at 3784296> >>> len(java.lang.Class.getMethods(java.lang.Number)) 15 >>> java.lang.Class.getMethods(java.lang.Number) array([public native int java.lang.Object.hashCode(), ....], java.lang.reflect.Method) >>> >I think Jython and specifically running pybench >under Jython would make for a pretty informative >real-world benchmark of the performance of the >different JVMs. Indeed. Keep in mind that the adaptive JVMs makes it hard to measure a benchmark. Very few python benchmarks are designed for an environment where each run through the program is a little faster than the previous one. The fine pybench: http://www.lemburg.com/files/python/Introduction.html is both very usefull and totally useless. When used for its purpose (tweaking a python implementation) it is great, but it can't be trusted as a benchmark of java VMs. - It only shows how well the JVM handles a jython usage pattern. F.ex calls of reflected methods are not that common outside script languages like jython. - There are given no weights to the different tests. A slow attribute lookup may (or may not depending on the application) hurt more than a slow string concatination. As always, use benchmarks with care. OTOH I would dearly like to see the results of your pybench benchmarks. The -f and -c options are usefull for this. regards, finn |