All Downloads are FREE. Search and download functionalities are using the official Maven repository.

testsrc.benchmarks.sunspider-0.9.1.bitops-nsieve-bits.js Maven / Gradle / Ivy

Go to download

A distribution of rhino which releases snapshots from a submodule folder containing forked sources.

The newest version!
// The Great Computer Language Shootout
//  http://shootout.alioth.debian.org
//
//  Contributed by Ian Osgood

function pad(n,width) {
  var s = n.toString();
  while (s.length < width) s = ' ' + s;
  return s;
}

function primes(isPrime, n) {
  var i, count = 0, m = 10000<>5;

  for (i=0; i>5] & 1<<(i&31)) {
      for (var j=i+i; j>5] &= ~(1<<(j&31));
      count++;
    }
}

function sieve() {
    for (var i = 4; i <= 4; i++) {
        var isPrime = new Array((10000<>5);
        primes(isPrime, i);
    }
}

sieve();




© 2015 - 2024 Weber Informatics LLC | Privacy Policy