HTML Preparation code:
AخA
 
1
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.5/lodash.core.js"></script>
2
<script>
3
const forEach = Function.bind.call(Function.call, Array.prototype.forEach);
4
const isEnumerable = Function.bind.call(Function.call, Object.prototype.propertyIsEnumerable);
5
const concat = Function.bind.call(Function.call, Array.prototype.concat);
6
const keys = Reflect.ownKeys;
7
  
8
if (!Object.valuess) {
9
    Object.valuess = function values(O) {
10
        const values = [];
11
        for(val in O) values.push(val);
12
        return values;
13
    };
14
}
15
</script>
Script Preparation code:
 
var a = { a: 1, b: 2, c: 3};
Tests:
  • _.values

     
    _.values(a);
  • Object values

     
    Object.values(a);
  • proposal-object-values-entries/polyfill.js

     
    Object.valuess(a);
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    _.values
    Object values
    proposal-object-values-entries/polyfill.js

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 6 years ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:66.0) Gecko/20100101 Firefox/66.0
Firefox 66 on Mac OS X 10.13
View result in a separate tab
Test name Executions per second
_.values 2336495.2 Ops/sec
Object values 10145503.0 Ops/sec
proposal-object-values-entries/polyfill.js 20998538.0 Ops/sec