This page is a modification of the YuzuJS demo which was a modification of the original Microsoft demo to illustrate the differences between 15ms clamping, 4ms clamping and setImmediate (implemented natively in MSIE 10+ and with a shim in the YuzuJS demo). Here I retain the YuzuJS setImmediate shim and add my fast soon approach.
Of course this is not a "fair" comparison (the soon script is not updating the screen for each operation) - so to fully appreciate what this illustrates you must understand the trade offs and when to use each approach. More information can be found on the blog article for this demo.
The following text is the original text carried forward from the original MS version:
This demo visually sorts 250 items using the Quick Sort algorithm once per callback, making one swap during each browser callback. The more browser callbacks per second the faster the items will be sorted. While this is not how you would efficently implement a sorting algoritm it's a fun way to visualize the impact of callbacks per second. Try sorting using the HTML4 resolution of 15.6ms per callback, the HTML5 resolution of 4ms per callback, and the new setImmediate approach of immediate callbacks. Special thanks to Erik Kay and Mike Belshe from the Google Chrome engineering team for the quick sort test used to demonstrate the benefits of the new setImmediate API. The original demo was created by Jason Weber from Microsoft Corporation as part of the IE Test Drive demos. The demo was later adapted by JP Castro to demonstrate the setImmediate.js cross browser shim. Demo source code is available on GitHub.