Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Solutions to 15-Hole Peg Solitaire in a number of languages for the purpose of performance testing
JavaScript C Java Other
branch: master
Failed to load latest commit information.
.settings initial commit
src fixed lang_rt property of results objects
.classpath initial commit
.gitignore added time in ms to the legend, agged .gitignore
.project initial commit
README.md grammar

README.md

About

This repository contains the source code for solving the 15-Hole Peg Soltaire game in a number of different programming languages. It is based off the code that Jonathan Fuerth wrote for his presentation on Java/HotSpot performance. You will find that presentation here.

Spoiler alert

His results showed that Java under the HotSpot VM is faster than everything else provided including C. However, what interests me the most is that JavaScript under V8 comes in second once you use proper prototypical inherentence. That's right, Java > JavaScript > C for this test.

Of course there are caveats. The C code provided follows an Object Oriented style. It is certainly possible to optimize this code further using a more procedural style with less memory allocation. But then this style of coding should be adapted to the other languages presented as well. Further more I'd argue that maintaining code written in this manneris difficult and expensive. Regardless, I whole heartedly encourge you submit pull requests with these new versions in separate directories based on the style/technique used.

License

BSD

Something went wrong with that request. Please try again.