Skip to content

Commit

Permalink
docs: Update benchmark results table
Browse files Browse the repository at this point in the history
  • Loading branch information
ntucker committed Dec 18, 2023
1 parent 67f4e0b commit 3ff2d3a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 12 deletions.
15 changes: 7 additions & 8 deletions examples/benchmark/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[Progress over time](https://data-client.github.io/data-client/dev/bench/)
[Progress over time](https://reactive.github.io/data-client/dev/bench/)

### Usage

Expand All @@ -22,12 +22,11 @@ No argument will run `normalizr` + `core`
Performance compared to normalizr package (higher is better):

| | no cache | with cache |
|---------------------|----------|------------|
| normalize (long) | 72% | 72% |
| denormalize (long) | 100% | 830% |
| denormalize (short) | 600% | 1120% |
| ------------------- | -------- | ---------- |
| normalize (long) | 80% | 80% |
| denormalize (long) | 119% | 838% |
| denormalize (short) | 544% | 2,026% |

[Comparison done on a Ryzen 7950x; Ubuntu; Node 18.15.0]
[Comparison done on a Ryzen 7950x; Ubuntu; Node 20.10.0]

Our normalize is slower due to handling much more features like metadata. Denormalize
is even more feature rich, but significantly faster.
Not only is denormalize faster, but it is more feature-rich as well.
1 change: 0 additions & 1 deletion examples/benchmark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"@data-client/core": "workspace:^",
"@data-client/endpoint": "workspace:^",
"@data-client/normalizr": "workspace:^",
"@js-temporal/polyfill": "^0.4.4",
"benchmark": "^2.1.4",
"normalizr": "^3.6.2",
"react": "^18.2.0"
Expand Down
2 changes: 0 additions & 2 deletions examples/benchmark/schemas.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { Temporal } from '@js-temporal/polyfill';

import { Entity, schema, Query } from './dist/index.js';

export class BuildTypeDescription extends Entity {
Expand Down
1 change: 0 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13622,7 +13622,6 @@ __metadata:
"@data-client/core": "workspace:^"
"@data-client/endpoint": "workspace:^"
"@data-client/normalizr": "workspace:^"
"@js-temporal/polyfill": "npm:^0.4.4"
"@types/babel__core": "npm:^7"
"@types/benchmark": "npm:2.1.5"
"@types/react": "npm:18.2.45"
Expand Down

0 comments on commit 3ff2d3a

Please sign in to comment.