Permalink
Browse files

readme-ing it up

  • Loading branch information...
1 parent e03d312 commit 3608ab8b90f53f27d301bb69b49bfb9bbf90f06c @regality committed Jun 23, 2012
Showing with 13 additions and 3 deletions.
  1. +10 −0 README.md
  2. +3 −3 test.js
View
@@ -19,3 +19,13 @@ var primes = sieve(1000000);
// primes from 100 to 1000000
var primes = sieve(1000000, 100);
```
+
+The sieve returns a Uint32Array, unless you are using a shitty browser,
+in which case you just get an ordinary array.
+
+## Perfomance
+
+On my macbook pro, it found all primes from 2 to 100,000,000 in 2723ms.
+
+It has memory issues with arrays much larger than that. If that is a
+problem, submit a pull request.
View
@@ -1,11 +1,11 @@
-var numberSeive = require('./seive')
- , n = 10000000
+var numberSieve = require('./sieve')
+ , n = 100000000
;
console.log('generating primes...');
console.time('primes generated in');
-var primes = numberSeive(n);
+var primes = numberSieve(n);
console.timeEnd('primes generated in');
console.log('found ' + primes.length + ' primes');

0 comments on commit 3608ab8

Please sign in to comment.