Skip to content

Add benchmark for structuredClone#51249

Closed
rubennorte wants to merge 3 commits into
facebook:mainfrom
rubennorte:export-D71407319
Closed

Add benchmark for structuredClone#51249
rubennorte wants to merge 3 commits into
facebook:mainfrom
rubennorte:export-D71407319

Conversation

@rubennorte
Copy link
Copy Markdown
Contributor

Summary:
Changelog: [internal]

This adds a basic benchmark for structuredClone, so we can optimize it in the following diff.

Baseline:

(index) Task name Latency average (ns) Latency median (ns) Throughput average (ops/s) Throughput median (ops/s) Samples
0 'clone a string' '955.81 ± 1.45%' '902.00' '1095925 ± 0.01%' '1108647' 1046239
1 'clone a basic array' '7684.79 ± 0.76%' '7542.00' '131980 ± 0.02%' '132591' 130128
2 'clone a basic object' '6286.35 ± 0.53%' '6179.00' '161179 ± 0.02%' '161838' 159075
3 'clone a complex object' '22446.96 ± 0.32%' '22223.00' '44819 ± 0.03%' '44998' 44550

Differential Revision: D71407319

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner labels May 12, 2025
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D71407319

@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D71407319

@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D71407319

@rubennorte rubennorte force-pushed the export-D71407319 branch 3 times, most recently from 25a6cfe to 8e7ea1f Compare May 12, 2025 13:06
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D71407319

1 similar comment
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D71407319

@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D71407319

@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D71407319

1 similar comment
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D71407319

Differential Revision: D71407318
Differential Revision: D71407320
Summary:
Pull Request resolved: facebook#51249

Changelog: [internal]

This adds a basic benchmark for `structuredClone`, so we can optimize it in the following diff.

Baseline:

| (index) | Task name                | Latency average (ns) | Latency median (ns) | Throughput average (ops/s) | Throughput median (ops/s) | Samples |
| ------- | ------------------------ | -------------------- | ------------------- | -------------------------- | ------------------------- | ------- |
| 0       | 'clone a string'         | '955.81 ± 1.45%'     | '902.00'            | '1095925 ± 0.01%'          | '1108647'                 | 1046239 |
| 1       | 'clone a basic array'    | '7684.79 ± 0.76%'    | '7542.00'           | '131980 ± 0.02%'           | '132591'                  | 130128  |
| 2       | 'clone a basic object'   | '6286.35 ± 0.53%'    | '6179.00'           | '161179 ± 0.02%'           | '161838'                  | 159075  |
| 3       | 'clone a complex object' | '22446.96 ± 0.32%'   | '22223.00'          | '44819 ± 0.03%'            | '44998'                   | 44550   |

Reviewed By: hoxyq

Differential Revision: D71407319
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D71407319

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label May 13, 2025
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request has been merged in f7327bd.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants