On Jul 5, 3:05 pm, Nicolas Oury <nicolas.o...@gmail.com> wrote:
> Actually, that would be so good, that I actually think there is a mistake
> somewhere either in my program or my computation of the speed.
> Let's wait for igorrumiha to check and to test this implementation.
>

OK, I did my tests, I found and fixed two small bugs and as far as I
can tell the VM is now working correctly. I couldn't, however,
reproduce the timings Nicolas had, on my machine (a 2 Ghz MacBook with
java 1.6 build 1.6.0_13-b03-211) I got timings between 570 and 637
seconds for 100 000 000 executions. So, this translates, on average,
to 163585 executions/second. That translates to 45.9 clock cycles per
guest VM instruction.

I used these tuning options for the Java VM:
-XX:InitialCodeCacheSize=768m
-XX:ReservedCodeCacheSize=1024m
-Xms768M
-Xmx768M
-server

I consider this an excellent result, about 2.5 times faster than my
simple Java implementation of the VM.

I can't explain the 5.2x difference between my and Nicolas' timings,
though :)

What I can say is that my quest for Orbital Virtual Machine speed is
satisfied. With a simulation time limit of 3 million seconds (set by
the contest rules) this VM now reaches that limit in ~19 seconds of
wallclock time. That's even good enough for interactive exploration of
problem solutions (I think it's very likely that it will usually take
more than 19 seconds to write a new version of a solution and then run
it in the REPL :))

I think it's safe to say that once again it's proved that Clojure
easily matches the Java level of performance.

What I've learned from this is:
1. I need to read the documentation more carefully :),
2. I need to learn how to write macros,
3. I need to get myself acquainted with the underlying JVM platform,
4. When in trouble, the clojure group is an excellent place to get
help.
5. Write lots and lots of Clojure code, that is the only way to get
enough experience for the next ICFP contest :)

Thanks a bunch everyone, especially Nicolas for being so persistent :)


p.s.
I'll update my git repo in a day or two, I need to clean up the code a
bit and port the game logic code to use the new VM.


Igor.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to