Skip to content
This repository

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

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 .settings
Octocat-spinner-32 src
Octocat-spinner-32 .classpath
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .project
Octocat-spinner-32 README.md
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.