As Rich Internet Application development progresses, more and more developers are moving towards the functional programming capabilities of JavaScript.
First Order Functions, Closures, Macros and Lists are becoming a mainstream method of development.
When you can tell the computer how to do it, rather that listing what it needs to do, it becomes much easier to write a program and needs a lot less code.
Think recipe instead of precise instructions.
So how does Chrome compare to the other browsers when doing this?
What did we test?
I used JSTR to create a re-usable test of basic Functional programming.
The test creates a list(array) from a DOM collection, runs a filter on the list to identify the required elements, then performs an action on those elements remaining.
Follow this LINK to run the test for yourself.
Paste the link into another browser to test it on different systems.
The test is pretty basic, but it provide a nice demonstration of the capabilites of Chrome.
So how did they do?
Testing 1000 loops on a windows XP machine with 2Gb ram:
Testing used 10 repetitions for averaging.
Conclusions
It looks like the more modern browsers (FF3, Chrome, Safari) are now concentrating a great deal on Javascript performance. A very good piece of news for anyone developing Rich Internet Applications.
I must admit I was surprised by the performance of Safari on WindowsXP but it is nice to get surprises like this.
I had expected Chrome to out perform everything else and was a little disappointed to see otherwise. However, it is definetely a top notch Javascript system and I look forward to watching it develop.
This test does raise the issue that older versions of any browser will have significant differences in run-time speed for your application.
It looks like we will soon be back to the days of specifying a minumim compatible browser version, and the list will be quite short.
Request for Comments
If you have a different operating system or browser... can you please let me know how it performs in this test?
- Use the link above to launch JSTR, pre-loaded with the test..
- Clear the Console
- Press RUN
If you can leave a comment with the output, I will add it to the data collected.
Что-то футер у вас вправо съехал (в опере при разрешении 1024х768)
ReplyDelete