This page allows you to run the BMA# and BML# tests in a browser on your computer.

Please note the following issues:

  1. Javascript and Basic are both interpreted languages and so do not truly reflect the computing power of your computer.
  2. Some browsers impose time limits on JavaScripts, so you need to choose a test that runs for under about 10 seconds to ensure it isn't interrupted.
  3. Since the time increment in JavaScript is 1 millisecond, tests that don't run for at least 200 milliseconds will have roundoff errors of 1% or greater (potentially a millisecond error on start and stop).
Select Test:
Test Duration:
Loops/sec
µsec/loop:

Return to previous page.

Below is the JavaScript code for the BML and BMA tests:

function BML(limit) { var start = new Date() / 1000; var i, j; var reps = Math.pow(10, limit); for(i = 0; i < reps; i++){} var end = new Date() / 1000; var elapsedTime = (Math.round(1000 * (end - start)) / 1000); document.result.text.value = elapsedTime; document.loopsPerSec.text.value = Math.round(reps/elapsedTime); document.usecPerLoop.text.value = 1000000 * elapsedTime/reps; }
function BMA(limit) { document.result.text.value = ""; var start = new Date() / 1000; var i, j; var reps = Math.pow(10, limit); for(i = 0; i < reps; i++){j = (6 * (i - 1) + 9 ) / 3;} var end = new Date() / 1000 var elapsedTime = (Math.round(1000 * (end - start)) / 1000); document.result.text.value = elapsedTime; document.loopsPerSec.text.value = Math.round(reps/elapsedTime); document.usecPerLoop.text.value = 1000000 * elapsedTime/reps; }