codemix/fast.js — pull request #42 by phpnode (2014-06-29 23:59:58+00:00)
Title: add .filter()

### V8
```
Running 3 benchmarks, please wait...

Native .filter() vs fast.filter() (3 items)
✓ Array::filter() x 1,910,969 ops/sec ±1.39% (83 runs sampled)
✓ fast.filter() x 7,235,600 ops/sec ±1.11% (88 runs sampled)
✓ underscore.filter() x 1,761,421 ops/sec ±1.25% (83 runs sampled)
✓ lodash.filter() x 5,690,636 ops/sec ±1.33% (80 runs sampled)

Result: fast.js is 278.64% faster than Array::filter().

Native .filter() vs fast.filter() (10 items)
✓ Array::filter() x 981,244 ops/sec ±1.38% (84 runs sampled)
✓ fast.filter() x 3,162,557 ops/sec ±1.26% (88 runs sampled)
✓ underscore.filter() x 926,140 ops/sec ±1.02% (88 runs sampled)
✓ lodash.filter() x 2,762,187 ops/sec ±1.18% (84 runs sampled)

Result: fast.js is 222.30% faster than Array::filter().

Native .filter() vs fast.filter() (1000 items)
✓ Array::filter() x 19,433 ops/sec ±1.23% (88 runs sampled)
✓ fast.filter() x 35,859 ops/sec ±1.47% (93 runs sampled)
✓ underscore.filter() x 19,197 ops/sec ±1.41% (86 runs sampled)
✓ lodash.filter() x 35,231 ops/sec ±1.35% (86 runs sampled)

Result: fast.js is 84.52% faster than Array::filter().
```

### SpiderMonkey
```
Running 3 benchmarks, please wait...

Native .filter() vs fast.filter() (3 items)
✓ Array::filter() x 3,465,915 ops/sec ±0.23% (70 runs sampled)
✓ fast.filter() x 15,486,360 ops/sec ±0.20% (70 runs sampled)
✓ underscore.filter() x 3,065,535 ops/sec ±0.18% (68 runs sampled)
✓ lodash.filter() x 7,222,525 ops/sec ±0.20% (66 runs sampled)

Result: fast.js is 346.82% faster than Array::filter().

Native .filter() vs fast.filter() (10 items)
✓ Array::filter() x 1,347,786 ops/sec ±0.17% (69 runs sampled)
✓ fast.filter() x 3,204,620 ops/sec ±0.26% (70 runs sampled)
✓ underscore.filter() x 1,290,627 ops/sec ±0.32% (69 runs sampled)
✓ lodash.filter() x 2,564,004 ops/sec ±0.16% (70 runs sampled)

Result: fast.js is 137.77% faster than Array::filter().

Native .filter() vs fast.filter() (1000 items)
✓ Array::filter() x 14,855 ops/sec ±0.63% (66 runs sampled)
✓ fast.filter() x 30,421 ops/sec ±0.53% (65 runs sampled)
✓ underscore.filter() x 14,943 ops/sec ±0.47% (66 runs sampled)
✓ lodash.filter() x 30,241 ops/sec ±0.32% (66 runs sampled)

Result: fast.js is 104.78% faster than Array::filter().

```