I’ve recently been playing a puzzle game called tetravex on Ubuntu, so I thought I’d write a version of it for HTML5. It’s designed to work on android phones and the iphone (only in vertical orientation at the moment), but if you’re using a modern browser you should see a working version of it below. The GUI still needs a lot of work, and I’m sure there are bugs, but pretty much all the functionality of the linux version is in there. On a phone, you can visit this direct link and then save it onto your homescreen to run it as an application. This should let it run offline too. It uses localStorage to store the high score table.

Update: Turns out it uses some features that Apple don’t support on iphone yet. I’ll try to make it more backwards compatible later. In the meantime, Chrome, Desktop Safari, Firefox and Android Browser should all work fine.


Firefox 3.1b1pre (includes tracemonkey) vs Google Chrome

The one that’s faster on everything except date, regex and some string is google chrome.
Test was sunspider-0.9. Of course, this is a firefox nightly build, so it may well improve, but then so may Chrome.

My Mistake. Actually the figures below are with jit not enabled. I enabled it and tried to rerun the test. It was looking as if it would be even faster than Chrome, but then half way through it crashed the entire browser. Oh well.

Rant On A Related Note: does saying 1.49x as fast make any sense? Fastness isn’t a measure unless you mean velocity, which doesn’t have an obvious meaning in this case, since there is no reliable measure of the ground to be covered. The measure that makes sense is how long something takes, so 2x slower makes sense – it takes twice the time. Saying 2x faster implies that there is some measure of fastness that has increased. It seems to me that logically, fastness is a measure of the time it didn’t take, not 1 over the time it did take. Of course, the time it didn’t take is so large as to be unusable as a way of thinking, so maybe we could stick with things like “took half the time”, or maybe even “half as slow”, rather than these imaginary “fastness” measures.

TEST                   COMPARISON            FROM                 TO             DETAILS


** TOTAL **:           1.49x as fast     7574.0ms +/- 5.2%   5081.8ms +/- 7.2%     significant


  3d:                  2.47x as fast      917.8ms +/- 6.4%    371.4ms +/- 7.3%     significant
    cube:              3.26x as fast      319.2ms +/- 9.1%     97.8ms +/- 17.3%     significant
    morph:             1.75x as fast      266.2ms +/- 1.3%    151.8ms +/- 9.7%     significant
    raytrace:          2.73x as fast      332.4ms +/- 8.4%    121.8ms +/- 21.2%     significant

  access:              4.31x as fast     1148.2ms +/- 5.4%    266.6ms +/- 14.8%     significant
    binary-trees:      8.38x as fast      145.8ms +/- 23.3%     17.4ms +/- 10.8%     significant
    fannkuch:          5.87x as fast      517.4ms +/- 3.9%     88.2ms +/- 17.2%     significant
    nbody:             3.36x as fast      349.2ms +/- 4.0%    103.8ms +/- 22.3%     significant
    nsieve:            2.37x as fast      135.8ms +/- 11.5%     57.2ms +/- 14.3%     significant

  bitops:              4.65x as fast      887.4ms +/- 2.1%    191.0ms +/- 10.4%     significant
    3bit-bits-in-byte: 13.1x as fast      193.8ms +/- 6.1%     14.8ms +/- 11.0%     significant
    bits-in-byte:      6.09x as fast      201.0ms +/- 4.1%     33.0ms +/- 9.6%     significant
    bitwise-and:       3.52x as fast      198.8ms +/- 5.6%     56.4ms +/- 17.7%     significant
    nsieve-bits:       3.38x as fast      293.8ms +/- 5.9%     86.8ms +/- 13.1%     significant

  controlflow:         11.3x as fast      113.0ms +/- 4.2%     10.0ms +/- 0.0%     significant
    recursive:         11.3x as fast      113.0ms +/- 4.2%     10.0ms +/- 0.0%     significant

  crypto:              3.00x as fast      537.2ms +/- 7.1%    179.0ms +/- 18.4%     significant
    aes:               2.95x as fast      193.4ms +/- 6.1%     65.6ms +/- 27.4%     significant
    md5:               2.91x as fast      172.4ms +/- 15.9%     59.2ms +/- 19.3%     significant
    sha1:              3.16x as fast      171.4ms +/- 7.0%     54.2ms +/- 18.1%     significant

  date:                *1.39x as slow*    632.4ms +/- 6.2%    880.2ms +/- 8.0%     significant
    format-tofte:      *1.42x as slow*    373.2ms +/- 5.1%    529.4ms +/- 5.8%     significant
    format-xparb:      *1.35x as slow*    259.2ms +/- 8.7%    350.8ms +/- 12.6%     significant

  math:                2.69x as fast      931.0ms +/- 7.1%    345.8ms +/- 11.3%     significant
    cordic:            2.19x as fast      417.6ms +/- 5.9%    190.8ms +/- 16.9%     significant
    partial-sums:      2.81x as fast      328.0ms +/- 15.4%    116.8ms +/- 18.0%     significant
    spectral-norm:     4.85x as fast      185.4ms +/- 7.8%     38.2ms +/- 7.4%     significant

  regexp:              *1.90x as slow*    618.8ms +/- 15.4%   1177.0ms +/- 6.2%     significant
    dna:               *1.90x as slow*    618.8ms +/- 15.4%   1177.0ms +/- 6.2%     significant

  string:              1.08x as fast     1788.2ms +/- 4.2%   1660.8ms +/- 8.0%     significant
    base64:            *1.21x as slow*    161.6ms +/- 7.9%    195.0ms +/- 13.2%     significant
    fasta:             2.08x as fast      363.0ms +/- 7.3%    174.6ms +/- 11.5%     significant
    tagcloud:          *1.39x as slow*    331.8ms +/- 1.7%    460.2ms +/- 9.4%     significant
    unpack-code:       1.20x as fast      702.2ms +/- 5.4%    584.4ms +/- 12.2%     significant
    validate-input:    ??                 229.6ms +/- 9.7%    246.6ms +/- 10.2%     not conclusive: might be *1.07x as slow*