SPy (almost) works in the JVM
Just wanted to mention that I fixed several bugs holding SPy [Smalltalk in PyPy] back from working in the JVM. The "mini.image" code now runs, but I'm not sure it does precisely the right thing, as the number of hash marks ("#") that are output differs in the JVM and CLI. The biggest error was the fact that we were converting byte arrays into Java Strings using the default encoding, which I think is UTF-8 (or something). The end result was that we did not read binary files correctly (hence the assertion errors in image decoding). Here is the output of the JVM and the CLI on my machine: ;./targetimageloadingsmalltalk-jvm ../../lang/smalltalk/mini.image ################<pypy.lang.smalltalk.model.W_CompiledMethod object> Going to execute 78 toplevel bytecodes #####################################################################################################################################994035 bytecodes/sec; 70776 sends/sec ;./targetimageloadingsmalltalk-cli ../../lang/smalltalk/mini.image ################<pypy.lang.smalltalk.model.W_CompiledMethod object> Going to execute 78 toplevel bytecodes #################################################################################################################################################################################################2418379 bytecodes/sec; 106874 sends/sec Anyway, getting closer... Niko
Hi Niko, On Sat, Mar 08, 2008 at 03:07:02PM +0100, Niko Matsakis wrote:
the number of hash marks ("#") that are output differs in the JVM and CLI.
That's fine: the Smalltalk code in mini.image is a benchmark that runs until some total amount of time is elapsed, so the number of iterations (and #'s) varies according to the performance. A bientot, Armin
participants (2)
-
Armin Rigo
-
Niko Matsakis