Code performance database...

I have been recently writing lots of PHP using the MediaWiki libraries. The performance was somewhat shocking for multiple article inserts, so I set about writing a new optimized import routine. I didn't need the huge amounts of validation. Whilst I was doing that I realized I really had no clue about what is the fastest way to achieve a certain task in PHP, and what performance penalties you might suffer if you do it another way.

I then realized I didn't know how fast most langauges I used were. Javascript running on Mozilla under linux is quicker or slower than Windows? How about IE? Is for ... in a good way to step thru an array?

The task was now set: create a framework and database that can be used to run tests on multiple platforms running multiple versions of the language. Make the results accessible and updateable by all.

The aim is to not just say what processor is better, but what software, and how much effect a new version of it has.

The results of my labour can be found on SavagePM my new site dedicated to finding the best ways to code. I have only done the PHP test and Javascript tests - and there are many more to add - at the moment, but I intend to do Java, C#, and any other langauges people care to write harnesses for.

Try the javascript test here! Yes, its not very interesting yet, but it has proved that Firefox JS is far better at Strings than IE. Over time I'll be adding a battery of tests to try every bit of Javascript performance.

With enough results it should be possible to get a fair idea of the best methods to use for each task and platform - with some interesting comparisons to be made between similar tests.

Once I have enough results I'm going to take a good look, and write a primer for what's fast and what's not.

That's the dream - now come and help make it a reality!

Comments

Popular Posts