Kraken Info

From MozillaWiki
Jump to navigation Jump to search

This info is for Kraken 1.0.

ai-astar

A toy benchmark. A path-finding program that uses A* search.

Key features. The benchmark spends almost all of its time in the loop in the following function.

Array.prototype.findGraphNode = function(obj) {
    for(var i=0;i<this.length;i++) {
        if(this[i].pos == obj.pos) { return this[i]; }
    }
    return false;
};

Mozilla-specific things. The above loop is traced and accounts for roughly 95% of execution time.

audio-beat-detection

Key features. Overwrites holes in arrays a lot.

audio-dft

audio-fft

Mozilla-specific things. Judging from the Cachegrind results, it's almost identical to audio-beat-detection.

audio-oscillator

== imaging-gaussian-blur --

imaging-darkroom

imaging-desaturate

Description. A kernel. A 400 x 267 image is represented as an array where each pixel gets four values, representing the (R, G, B, Alpha) values. All values are in the range 0..255.

Key features. Almost all the benchmark's time is spent in this loop:

while (p--)
    data[pix-=4] = data[pix1=pix+1] = data[pix2=pix+2] = (data[pix]*0.3 + data[pix1]*0.59 + data[pix2]*0.11);

It iterates through each pixel, setting the (R, G, B) values all to the same value, which is a function of the prior (R, G, B) values.

json-stringify-tinderbox

A microbenchmark. Calls JSON.stringify() 1000 times on an object that takes up over 450,000 chars to express in a file.

Key features. The result of the call to JSON.stringify() is never used, so this benchmark is susceptible to gaming -- an implementation could detect that the result isn't used and call a faster version of JSON.stringify() that doesn't build the result (ie. an empty function).

stanford-crypto-aes

stanford-crypto-ccm

stanford-crypto-pbkdf2

stanford-crypto-sha256-iterative