Skip to content

Commit

Permalink
run benchmarks, build readme with verb
Browse files Browse the repository at this point in the history
  • Loading branch information
jonschlinkert committed Sep 12, 2021
1 parent cdc7446 commit 276ce85
Show file tree
Hide file tree
Showing 5 changed files with 559 additions and 5,086 deletions.
81 changes: 41 additions & 40 deletions README.md
@@ -1,4 +1,4 @@
# set-value [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://paypal.me/jonathanschlinkert?locale.x=en_US) [![NPM version](https://img.shields.io/npm/v/set-value.svg?style=flat)](https://www.npmjs.com/package/set-value) [![NPM monthly downloads](https://img.shields.io/npm/dm/set-value.svg?style=flat)](https://npmjs.org/package/set-value) [![NPM total downloads](https://img.shields.io/npm/dt/set-value.svg?style=flat)](https://npmjs.org/package/set-value)
# set-value [![NPM version](https://img.shields.io/npm/v/set-value.svg?style=flat)](https://www.npmjs.com/package/set-value) [![NPM monthly downloads](https://img.shields.io/npm/dm/set-value.svg?style=flat)](https://npmjs.org/package/set-value) [![NPM total downloads](https://img.shields.io/npm/dt/set-value.svg?style=flat)](https://npmjs.org/package/set-value) [![Tests](https://github.com/jonschlinkert/set-value/actions/workflows/main.yml/badge.svg)](https://github.com/jonschlinkert/set-value/actions/workflows/main.yml)

> Set nested properties on an object using dot notation.
Expand Down Expand Up @@ -122,46 +122,46 @@ Benchmarks were run on a MacBook Pro 2.5 GHz Intel Core i7, 16 GB 1600 MHz DDR3.

```
# deep (194 bytes)
deep-object x 879,975 ops/sec ±0.85% (94 runs sampled)
deep-property x 1,746,617 ops/sec ±0.59% (96 runs sampled)
deephas x 792,449 ops/sec ±0.61% (94 runs sampled)
dot-prop x 1,258,403 ops/sec ±0.81% (93 runs sampled)
dot2val x 2,096,518 ops/sec ±0.71% (94 runs sampled)
es5-dot-prop x 1,627,431 ops/sec ±0.57% (94 runs sampled)
lodash-set x 1,100,116 ops/sec ±0.80% (94 runs sampled)
object-path-set x 1,292,062 ops/sec ±0.56% (91 runs sampled)
object-set x 276,868 ops/sec ±0.60% (92 runs sampled)
set-value x 2,587,076 ops/sec ±0.47% (92 runs sampled)
fastest is set-value (by 210% avg)
deep-object x 823,287 ops/sec ±1.00% (90 runs sampled)
deep-property x 1,787,990 ops/sec ±0.82% (92 runs sampled)
deephas x 840,700 ops/sec ±0.95% (93 runs sampled)
dot-prop x 1,249,663 ops/sec ±0.89% (90 runs sampled)
dot2val x 2,067,212 ops/sec ±1.08% (91 runs sampled)
es5-dot-prop x 1,668,806 ops/sec ±0.92% (92 runs sampled)
lodash-set x 1,286,725 ops/sec ±0.82% (90 runs sampled)
object-path-set x 1,261,242 ops/sec ±1.63% (90 runs sampled)
object-set x 285,369 ops/sec ±0.91% (90 runs sampled)
set-value x 2,076,931 ops/sec ±0.86% (93 runs sampled)
fastest is set-value, dot2val (by 203% avg)
# medium (98 bytes)
deep-object x 5,823,296 ops/sec ±0.63% (92 runs sampled)
deep-property x 4,045,998 ops/sec ±0.69% (91 runs sampled)
deephas x 1,237,999 ops/sec ±0.56% (92 runs sampled)
dot-prop x 2,833,082 ops/sec ±0.82% (93 runs sampled)
dot2val x 4,669,511 ops/sec ±0.50% (94 runs sampled)
es5-dot-prop x 3,348,092 ops/sec ±0.71% (92 runs sampled)
lodash-set x 3,051,898 ops/sec ±0.61% (94 runs sampled)
object-path-set x 3,867,590 ops/sec ±0.48% (92 runs sampled)
object-set x 888,369 ops/sec ±0.52% (96 runs sampled)
set-value x 8,209,356 ops/sec ±0.68% (91 runs sampled)
fastest is set-value (by 248% avg)
deep-object x 5,811,161 ops/sec ±1.12% (90 runs sampled)
deep-property x 4,075,885 ops/sec ±0.91% (90 runs sampled)
deephas x 1,508,136 ops/sec ±0.82% (92 runs sampled)
dot-prop x 2,809,838 ops/sec ±1.16% (87 runs sampled)
dot2val x 4,600,890 ops/sec ±0.76% (91 runs sampled)
es5-dot-prop x 3,263,790 ops/sec ±0.97% (91 runs sampled)
lodash-set x 3,486,628 ops/sec ±1.20% (90 runs sampled)
object-path-set x 3,729,018 ops/sec ±0.90% (92 runs sampled)
object-set x 973,961 ops/sec ±0.80% (92 runs sampled)
set-value x 6,941,474 ops/sec ±1.24% (90 runs sampled)
fastest is set-value (by 206% avg)
# shallow (101 bytes)
deep-object x 9,558,659 ops/sec ±0.81% (92 runs sampled)
deep-property x 5,190,792 ops/sec ±0.72% (93 runs sampled)
deephas x 1,395,091 ops/sec ±0.55% (90 runs sampled)
dot-prop x 4,203,222 ops/sec ±0.67% (94 runs sampled)
dot2val x 5,908,936 ops/sec ±0.52% (93 runs sampled)
es5-dot-prop x 4,511,259 ops/sec ±0.65% (94 runs sampled)
lodash-set x 8,624,572 ops/sec ±0.87% (90 runs sampled)
object-path-set x 5,800,121 ops/sec ±0.73% (90 runs sampled)
object-set x 1,629,494 ops/sec ±0.68% (92 runs sampled)
set-value x 13,925,948 ops/sec ±0.68% (89 runs sampled)
fastest is set-value (by 268% avg)
deep-object x 9,416,410 ops/sec ±1.19% (89 runs sampled)
deep-property x 5,108,536 ops/sec ±0.98% (93 runs sampled)
deephas x 1,706,979 ops/sec ±0.98% (86 runs sampled)
dot-prop x 4,045,902 ops/sec ±1.10% (92 runs sampled)
dot2val x 5,862,418 ops/sec ±0.88% (91 runs sampled)
es5-dot-prop x 4,439,646 ops/sec ±1.18% (90 runs sampled)
lodash-set x 9,303,292 ops/sec ±1.19% (89 runs sampled)
object-path-set x 5,657,479 ops/sec ±0.95% (93 runs sampled)
object-set x 2,020,041 ops/sec ±0.92% (91 runs sampled)
set-value x 11,272,227 ops/sec ±1.36% (88 runs sampled)
fastest is set-value (by 213% avg)
```

Expand Down Expand Up @@ -265,22 +265,23 @@ You might also be interested in these projects:
* [has-value](https://www.npmjs.com/package/has-value): Returns true if a value exists, false if empty. Works with deeply nested values using… [more](https://github.com/jonschlinkert/has-value) | [homepage](https://github.com/jonschlinkert/has-value "Returns true if a value exists, false if empty. Works with deeply nested values using object paths.")
* [merge-value](https://www.npmjs.com/package/merge-value): Similar to assign-value but deeply merges object values or nested values using object path/dot notation. | [homepage](https://github.com/jonschlinkert/merge-value "Similar to assign-value but deeply merges object values or nested values using object path/dot notation.")
* [omit-value](https://www.npmjs.com/package/omit-value): Omit properties from an object or deeply nested property of an object using object path… [more](https://github.com/jonschlinkert/omit-value) | [homepage](https://github.com/jonschlinkert/omit-value "Omit properties from an object or deeply nested property of an object using object path notation.")
* [set-value](https://www.npmjs.com/package/set-value): Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths. | [homepage](https://github.com/jonschlinkert/set-value "Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths.")
* [set-value](https://www.npmjs.com/package/set-value): Set nested properties on an object using dot notation. | [homepage](https://github.com/jonschlinkert/set-value "Set nested properties on an object using dot notation.")
* [union-value](https://www.npmjs.com/package/union-value): Set an array of unique values as the property of an object. Supports setting deeply… [more](https://github.com/jonschlinkert/union-value) | [homepage](https://github.com/jonschlinkert/union-value "Set an array of unique values as the property of an object. Supports setting deeply nested properties using using object-paths/dot notation.")
* [unset-value](https://www.npmjs.com/package/unset-value): Delete nested properties from an object using dot notation. | [homepage](https://github.com/jonschlinkert/unset-value "Delete nested properties from an object using dot notation.")

### Contributors

| **Commits** | **Contributor** |
| --- | --- |
| 83 | [jonschlinkert](https://github.com/jonschlinkert) |
| 87 | [jonschlinkert](https://github.com/jonschlinkert) |
| 4 | [doowb](https://github.com/doowb) |
| 2 | [mbelsky](https://github.com/mbelsky) |
| 1 | [dkebler](https://github.com/dkebler) |
| 1 | [GlennKintscher](https://github.com/GlennKintscher) |
| 1 | [petermorlion](https://github.com/petermorlion) |
| 1 | [abetomo](https://github.com/abetomo) |
| 1 | [zeidoo](https://github.com/zeidoo) |
| 1 | [ready-research](https://github.com/ready-research) |
| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) |

### Author
Expand All @@ -298,4 +299,4 @@ Released under the [MIT License](LICENSE).

***

_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on April 28, 2021._
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on September 12, 2021._
2 changes: 1 addition & 1 deletion benchmark/index.js
Expand Up @@ -5,7 +5,7 @@ const argv = require('minimist')(process.argv.slice(2));
const bench = require('benchmarked');
const write = require('write');

bench.run({ fixtures: 'fixtures/*.js', code: 'code/*.js', dry: argv.dry })
bench.run({ fixtures: 'fixtures/*.js', code: 'code/*.js', dry: Boolean(argv['dry-run']) })
.then(function(stats) {
write.sync(path.join(__dirname, 'stats.json'), JSON.stringify(stats, null, 2));
write.sync(path.join(__dirname, 'stats.md'), bench.render(stats));
Expand Down

0 comments on commit 276ce85

Please sign in to comment.