Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[perf] split out pretty and create hot paths #229

Merged
merged 2 commits into from
Jul 21, 2022

Conversation

JoviDeCroock
Copy link
Member

This PR aims to create as many hot paths as possible, we went from being slower than react 18 string rendering to

FROM

Running "search-results"...

Running benchmark "preact"...
preact x 1,003 ops/sec ±1.53% (88 runs sampled)

Running benchmark "react"...
react x 1,127 ops/sec ±6.13% (76 runs sampled)

--------------
Running "color-picker"...

Running benchmark "preact"...
preact x 5,513 ops/sec ±0.29% (93 runs sampled)

Running benchmark "react"...
react x 5,829 ops/sec ±8.04% (79 runs sampled)
--------------

TO

Running "search-results"...

Running benchmark "preact"...
preact x 1,437 ops/sec ±1.56% (93 runs sampled)

Running benchmark "react"...
react x 1,235 ops/sec ±5.94% (82 runs sampled)

--------------

Running "color-picker"...

Running benchmark "preact"...
preact x 7,862 ops/sec ±0.31% (92 runs sampled)

Running benchmark "react"...
react x 6,083 ops/sec ±8.30% (78 runs sampled)

--------------

@changeset-bot
Copy link

changeset-bot bot commented Jul 21, 2022

🦋 Changeset detected

Latest commit: d83def7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
preact-render-to-string Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Member

@marvinhagemeister marvinhagemeister left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants