/mobile Handheld Friendly website

 performance measurements

Each table row shows performance measurements for this JavaScript V8 program with a particular command-line input value N.

 N  CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
1,000Bad Output  353   

Read the ↓ make, command line, and program output logs to see how this program was run.

Read mandelbrot benchmark to see what this program should do.

 notes

V8 version 3.25.20 [console: dumb]

 mandelbrot JavaScript V8 #2 program source code

/* The Computer Language Benchmarks Game

   http://benchmarksgame.alioth.debian.org/

   contributed by Thomas GODART (based on Greg Buchholz's C program)

   modified by TA

*/
var i, x, y,
    bit_num = 0,
    byte_acc = 0,
    iter = 50,
    limit = 4,
    Zr, Zi, Cr, Ci, Tr, Ti,
    d = +arguments[0];

print("P4\n" + d + " " + d + "\n");

for (y = 0; y < d; y += 1) {
  for (x = 0; x < d; x += 1) {
    Zr = 0,
    Zi = 0,
    Tr =0,
    Ti =0,
    Cr = 2 * x / d - 1.5,
    Ci = 2 * y / d - 1;

    for (i = 0; i < iter && Tr + Ti <= limit; i += 1) {
      Zi = 2 * Zr * Zi + Ci,
      Zr = Tr - Ti + Cr,
      Tr = Zr * Zr,
      Ti = Zi * Zi;
    }

    byte_acc <<= 1;

    if (Tr + Ti <= limit) {
      byte_acc |=  1;
    }

    bit_num += 1;

    if (bit_num === 8) {
      print(String.fromCharCode(byte_acc));
      byte_acc = 0,
      bit_num = 0;
    } else if (x === d - 1) {
      byte_acc <<= 8 - d % 8;
      print(String.fromCharCode(byte_acc));
      byte_acc = 0,
      bit_num = 0;
    }
  }
}

 make, command-line, and program output logs

Thu, 20 Mar 2014 07:13:13 GMT

COMMAND LINE:
/usr/local/src/v8/out/native/d8 --nodebugger mandelbrot.v8-2.v8 -- 1000

UNEXPECTED OUTPUT 

_out 1000_out differ: byte 14, line 3

(BINARY) PROGRAM OUTPUT NOT SHOWN

Revised BSD license

  Home   Conclusions   License   Play