codemix / codemix/fast.js

Object.values is faster than fast.values

Open
#96 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
3.4k
Forks
110
PR merge metrics
No merged PRs in 30d

Description

The new function [Object.values](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_objects/Object/values) is x2 faster than fast.values on v8.

```
✓ Native Object.keys().map() x 5,834,570 ops/sec ±0.29% (97 runs sampled)
✓ Native Object.values()) x 23,794,424 ops/sec ±0.29% (99 runs sampled)
✓ fast.values() x 11,353,450 ops/sec ±0.65% (94 runs sampled)
✓ underscore.values() x 5,779,038 ops/sec ±0.46% (94 runs sampled)
✓ lodash.values() x 3,933,563 ops/sec ±1.49% (96 runs sampled)
```
Maybe we could shim it in fast.js like [Object.keys](https://github.com/codemix/fast.js/blob/master/object/keys.js#L9)?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.