The term BogoMips and the calculation thereof comes from Linux, and more particularly its author Linus. Linus needed a calibration value in the kernel to deal with processor speeds. Bogo comes from bogus and MIPS stands for Millions of Instructions Per Second. BogoMips is essentially the number of million times per second a processor can do absolutely nothing. It is a portable way to get an indication of the CPU speed. (see the BogoMips mini-Howto)
In JavaScript, there is no way to get the CPU speed of the client environment, so this JavaScript program tries to do the same things as BogoMips in the Linux kernel, except that instead of determining the BogoMips of the CPU itself, it more determines the BogoMips of the JavaScript engine in the browser, making this even more bogus than BogoMips. Unlike the Linux BogoMips value which is quantizised so you're most likely to get the exact same number all the time, the JS-BogoMips value can vary on each run due to system load and other underlying factors.
JS-BogoMIPS (3x) = Testing...
Resulting effects level =
CPU Type | Speed (GHz) | # cores | Memory (GB) | OS | Firefox | IE ▾ | Safari | Opera |
---|---|---|---|---|---|---|---|---|
Intel Pentium II | .4 | 1 | 0.5 | Win2k | 0.027243 | |||
Intel Pentium 4 | 3.0 | 1 | 1.5 | WinXP | 0.098303 | 0.097802 | ||
Intel Pentium M | 1.6 | 1 | 1.0 | WinXP | 0.121514 | 0.110152 | 0.084813 | 0.331526 |
AMD AthlonXP 2400+ | 2.0 | 1 | 1.0 | WinXP | 0.128340 | 0.127986 | ||
Intel Pentium M | 1.7 | 1 | 2.0 | WinXP | 0.135167 | 0.141494 | 0.499329 | |
Intel Core 2 Duo | 2.2 | 2 | 4.0 | RHEL Linux (Gnome) | 0.257056 | 0.149144* | 0.130639* | 0.406282 |
Intel Pentium 4 | 3.8 | 1 | 3.0 | WinXP | 0.112462 | 0.153685 | ||
Intel Core Duo | 2.0 | 2 | 2.0 | WinXP | 0.122879 | 0.162483 | ||
AMD Athlon64 3200+ | 2.2 | 1 | 2.0 | SuSE Linux (KDE) | 0.113322 | 0.164155* | 0.222556* | 0.360118 |
Intel Core 2 Duo | 2.2 | 2 | 1.0 | VMWare WinXP | 0.343534 | 0.187287 | 0.214419 | 0.652730 |
Intel Core Duo | 2.0 | 2 | 2.0 | WinXP | 0.190670 | 0.215037 | ||
Intel Core 2 Duo | 2.2 | 2 | 2.0 | WinXP | 0.196254 | 0.229019 | 0.216083 | 0.678238 |
Intel Xeon | 2.6 | 2 | 5.0 | Mac OSX | 0.351555 | 0.276668 | ||
AMD Athlon64 5200+ | 2.6 | 2 | 2.0 | WinXP | 0.423898 | 0.271778 | 0.161482 | 0.647618 |
* On Linux systems, IE is run under Wine and Konqueror is substituted for Safari
This program was written in an attempt to determine how much data could be expected to be reasonably processed in an Ajax application on varying system speeds before the user experience would suffer. As sample usage of this calculation would be:
// if script.aculo.us Effects library is loaded and the client can handle it, use it if (Effect && jsBogoMips.getEffectsLevel() > 0) { Effect.Fade(popupWindow); } else { popupWindow.style.display = 'none'; }
The effects level is defined in the jsBogoMips code as a performance matrix which defines threshold levels to allow various functionality. The levels can be used in whatever way makes sense in your application. For example:
Currently the performance matrix, based on the above results, is defined as:
Browser | level0 | level1 | level2 |
Firefox | 0.05 | 0.10 | 0.15 |
IE | 0.05 | 0.10 | 0.15 |
Safari | 0.05 | 0.10 | 0.20 |
Opera | 0.20 | 0.30 | 0.40 |
Download jsBogoMips.js