Posts tagged `javascript`

I recently performed some cursory Javascript benchmarks with the new version of Firefox and Safari; curious about performance, I decided to do some testing of 32-bit browsers against their 64-bit counterparts. On Windows Vista x64, the only two browsers so available to me are Internet Explorer 7 and a recent nightly build of Firefox 3. The 64-bit comes from the Mozilla x86-64 project, specifically the build from 21 March 2008. The 32-bit build is a proper nightly from the same date from the official Mozilla FTP.

My hypothesis, before performing the tests, was that the 64-bit compilation would have little or no effect on the Javascript engine performance. It’s so difficult to optimize Javascript rendering, which is inherently single-threaded, and it seems likely to only benefit from a faster CPU clock than bigger memory registers. Afterward, I felt vindicated: Internet Explorer is likely the best test, and the difference was not statistically significant. In Firefox’s case, the 64-bit build was actually significantly worse, though this could easily be due to some other factor I have not taken into account; I have assumed that the source was compiled on the same date. See below for more details.

Read more…

§2017 · March 23, 2008 · 6 comments · Tags: , , , , ,

Safari

Safari 3.1 has been released, bringing with it all the latest and great Webkit code. Even though the UI still sucks (at least on Windows; ever hear of native GUIs, Apple?)

I decided to benchmark the Javascript performance of the new Safari against its more immediate predecessor, 3.04. This testing was done on a Windows XP SP2 installation; a HP workstation with a Pentium 4 and 2GB of RAM.

As you can see in the table below, the JS engine has improved considerably since the last build, cutting the total time by more than half.

Read more…

§2011 · March 18, 2008 · (No comments) · Tags: , , , , , , ,

Last December, I read Jeff Atwood’s write-up about SunSpider, a new Javascript benchmark created by the makers of WebKit/KHTML.

The world of Javascript is an interesting one right now; it seems like most major browsers are on the eve of a major new release, many with new (& improved JS engines). With WebKit’s porting to Windows in Safari (and eventually Konqueror, I imagine), yet another player has thrown his hat into the arena. Javascript is, as Jeff rightly says, the lingua franca of the web: everything is javascript-[based|dependent] today, and rich interfaces are now the norm, rather than a pleasant surprise.

As a web applications developer, I’ve banged by head against javascript and various and sundry browser implementations at work, and worried about performances, both now and in the future. Standardizing on a common library (cf. jQuery) helps, although the performance or functionality of jQuery plugins don’t always match those of home-grown counterparts. For instance, Brian McAllister’s Unobtrusive Table Sort Script far outpaces the popular TableSorter script for jQuery. I ended up implementing the latter at work, simply because of the sheer size of tables we render, and the relative slow speed of many of ours users’ browsers.

Read more…

§1956 · January 15, 2008 · (No comments) · Tags: , , , , , ,

I don’t usually talk about work on this blog, simply because I’ve read enough horror stories about blogging work matters to know how badly it ends. Granted, if I were to blog about my job, it would mostly consist of technology bits, but it’s still one of those grey areas I avoid out of propriety.

Yet, I find myself at home, with a White Russian and the urge to opine.

Read more…

§1941 · December 8, 2007 · 8 comments · Tags: , , , , , , ,

Two months ago, I wrote about using the jQuery library to extract citation information from blockquotes.

Just for grins, I’ve worked that snippet of code up into a genuine jQuery plugin. Go ahead and visit the page for more information. Or, download it directly.

MIT license.

§1922 · November 5, 2007 · 2 comments · Tags: , , ,