- Age / Gender:
- 23, Male
- concave boxes
- All Stats >
i am the planetary destroyer. go away.
- Community Stats
Level 10 Blank Slate
Ranked as Town Watch
For all the Java people out there, you might be surprised to know you're going to get Phasers in the future. Get ready for battle. Unfortunately, Proton Torpedo's didn't make the cut. Sorry.
On a side note, I've been working on a little virtual machine. So far, it is incomplete although there is only 1 part left to do before I probably make a 0.1 release, it works.
Documentation on the overall structure of the virtual machine and some benchmarks are here:
From the benchmarks, you can see it runs FizzBuzz 10,000,000 times in about 12 seconds when compiled with gcc -O3 -fomit-frame-pointer and when there's no output buffering to cause an I/O bottleneck. If compiled with output enabled, there are almost no speed improvements regardless of compiler flags since printf takes most of the time.
The resulting code of the VM when using gcc -O3 is quite desirable and efficient since it (largely) eliminates branch misprediction using direct jumps to register values, while instead there are just a lot of 'jne/je' instructions if compiled with say, -O0 or -O1.
I'm probably going to code up a C version of fizzbuzz without output as well to see how it compares to native C. I expect to be dominated.
Addendum: I wrote an C program equivalent to my example bytecode program - or as close as I could get it. Excellent results: With gcc -O3 -fomit-frame-pointer it can do 10,000,000 iterations in approximately a half a second. Major smackdown, right there.
I'll probably be blogging on my other blog about this in the future, in case you want to keep track of it.
Recent Game Medals
Total Medals Earned: 18 (From 3 different games.)