Skip to content

Commit 276ce85

Browse files
committed
run benchmarks, build readme with verb
1 parent cdc7446 commit 276ce85

File tree

5 files changed

+559
-5086
lines changed

5 files changed

+559
-5086
lines changed

README.md

Lines changed: 41 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# 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)
1+
# 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)
22

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

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

@@ -265,22 +265,23 @@ You might also be interested in these projects:
265265
* [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.")
266266
* [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.")
267267
* [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.")
268-
* [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.")
268+
* [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.")
269269
* [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.")
270270
* [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.")
271271

272272
### Contributors
273273

274274
| **Commits** | **Contributor** |
275275
| --- | --- |
276-
| 83 | [jonschlinkert](https://github.com/jonschlinkert) |
276+
| 87 | [jonschlinkert](https://github.com/jonschlinkert) |
277277
| 4 | [doowb](https://github.com/doowb) |
278278
| 2 | [mbelsky](https://github.com/mbelsky) |
279279
| 1 | [dkebler](https://github.com/dkebler) |
280280
| 1 | [GlennKintscher](https://github.com/GlennKintscher) |
281281
| 1 | [petermorlion](https://github.com/petermorlion) |
282282
| 1 | [abetomo](https://github.com/abetomo) |
283283
| 1 | [zeidoo](https://github.com/zeidoo) |
284+
| 1 | [ready-research](https://github.com/ready-research) |
284285
| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) |
285286

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

299300
***
300301

301-
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on April 28, 2021._
302+
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on September 12, 2021._

benchmark/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const argv = require('minimist')(process.argv.slice(2));
55
const bench = require('benchmarked');
66
const write = require('write');
77

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

0 commit comments

Comments
 (0)