Skip to content

Commit

Permalink
📝 Update benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
nlepage committed Jan 4, 2018
1 parent 0ac62d7 commit a6ff1c7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,17 +189,17 @@ toLowerCase({ nested: { prop: { 1: { msg: 'Hello' }, 2: { msg: 'Hi' }, 3: { msg
## Performances

We reused a [simple benchmark](https://github.com/Zenika/immutadot/tree/master/packages/immutadot-benchmark/src/benchmark.spec.js) originally made by [mweststrate](https://github.com/mweststrate) for [immer](https://github.com/mweststrate/immer).
It updates 10.000 items out of list of 100.000 todos items, these tests were executed on Node 8.4.0 with a MacBook Pro 2015:
It updates 10.000 items out of list of 100.000 todos items, these tests were ran with Node 8.4.0 on an Intel® Core™ i7-6560U CPU @ 2.20GHz:

```shell
Update todos list
✓ with mutation (2ms)
✓ with deep cloning, then mutation (628ms)
✓ with ES2015 destructuring (46ms)
✓ with immutable (w/o conversion to plain JS objects) (99ms)
✓ with immutable (w/ conversion to plain JS objects) (858ms)
✓ with immer (default implementation without autofreeze) (353ms)
✓ with immutad●t (137ms)
✓ with mutation (2ms)
✓ with deep cloning, then mutation (689ms)
✓ with ES2015 destructuring (42ms)
✓ with immutable (w/o conversion to plain JS objects) (50ms)
✓ with immutable (w/ conversion to plain JS objects) (1011ms)
✓ with immer (proxy implementation w/o autofreeze) (259ms)
✓ with immutad●t (77ms)
```

When applying operations on a path immutad●t tries to create the minimum of objects or arrays needed to guarantee your data structure to be immutable.
Expand Down
2 changes: 1 addition & 1 deletion packages/immutadot-benchmark/src/benchmark.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ describe('Benchmarks', () => {
})

let immerActual
it('with immer (default implementation without autofreeze)', () => {
it('with immer (proxy implementation w/o autofreeze)', () => {
immerActual = immer(frozenState, draft => {
for (let i = 0; i < MAX * MODIFY_FACTOR; i++)
draft[i].done = true
Expand Down

0 comments on commit a6ff1c7

Please sign in to comment.