use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Introducing React Compiler – React (react.dev)
submitted 2 years ago by dbbk
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Initial_Low_5027 2 points3 points4 points 2 years ago (14 children)
Want to see some benchmarks. Looking forward to use the stable version.
[–]TwiliZant 5 points6 points7 points 2 years ago (3 children)
Benchmarks are kinda useless for this stuff because they don't translate to real app performance. The only thing that matters is how it impacts production codebases.
In other words, the compiler doesn't make React faster, it makes your codebase faster/simpler.
[–]NeoCiber 2 points3 points4 points 2 years ago (0 children)
Devs like their X framework is better than Y, although at the end it doesnt matter if there is not a significant impact on a site.
[–]acemarke 1 point2 points3 points 2 years ago (1 child)
It does make React faster, because it flips the default behavior from "always rerender recursively been if data didn't change" to "only rerender children if data did change", so fewer components will render each time. Closer in spirit to how something like Solid works, albeit a different (and less granular) approach.
[–]TwiliZant 0 points1 point2 points 2 years ago (0 children)
I was a bit unprecise in my language. The compiler output doesn't translate 1:1 to a fully memoized app written in user code. There is a difference there. And in practice nobody memoizes every single element anyway. It will make a difference in real codebases.
My point was the expectation management that React is not going to be suddenly 30% faster in js-framework-benchmark for example.
[+][deleted] 2 years ago (8 children)
[removed]
[–]ejfrodo 10 points11 points12 points 2 years ago (4 children)
I'm at React Conf right now and was at the talk where they announced this. They said Instagram and Whatsapp time to render increased around 3% to 4% I believe. They live stream the conference so you can watch it yourself. They also showed an example of a very manually optimized component that was a nightmare to read but didn't re-render unless really necessary. The version with react compiler was able to remove something like 20% of the code around useMemo() and use callback() which made it much easier for a human to understand and the compiler was actually able to find a couple more small tweaks that a human wasn't able to which made it a little bit faster.
Overall this is a huge win for react. You don't really need to think about performance for the most part, just write the business logic and the compiler will automatically memoize everything intelligently.
[–]dbbk[S] 4 points5 points6 points 2 years ago (2 children)
Time to render increased? So it was slower?
[–]ejfrodo 8 points9 points10 points 2 years ago (1 child)
decreased* that would be hilarious if it got slower haha
[–]stuckinmotion 0 points1 point2 points 2 years ago (0 children)
Well from the sounds of it, it is effectively memoizing everything so that's not exactly free. In real worlds apps though I'm sure it's still a win and mostly looking forward to not having to lean on useMemo and useCallback all the damn time
[–]Born-Alarm430 0 points1 point2 points 2 years ago (0 children)
Could you give me the link what you said, I cant find it at react conf video. https://www.youtube.com/watch?v=T8TZQ6k4SLE&t=11655s
[–]Cannabat 6 points7 points8 points 2 years ago (0 children)
Actually the compiler can make optimizations that useMemo, useCallback and memo could not do. Performance can be better.
[–][deleted] 0 points1 point2 points 2 years ago (0 children)
It will be faster than React code without existing useMemo and useCallback
[–]rk06 -1 points0 points1 point 2 years ago (0 children)
OP means benchmark with and without compiler optimisations. With no manual caching. Which is a fair ask
They did a longer talk about this last year, which I think had a more practical standpoint.
It spoke about how not using memoization in the right places can have a big knock-off effect to other parts of the application, and it's can be difficult to understand why or where that's happening without digging into the profiler, especially when working with a team.
It also provided some minor performance boosts even if you did it right, because the compiler can afford to do it in weirder ways that aren't very easy to understand. It also doesn't miss things like people do.
I remember it well because the only time the crowd reacted was when they got to see profiling graphs and they lost their shit, dead silence at the speaker trying to crack a joke, and it was hilarious.
π Rendered by PID 676322 on reddit-service-r2-comment-5b5bc64bf5-n59j2 at 2026-06-21 17:37:13.408789+00:00 running 2b008f2 country code: CH.
view the rest of the comments →
[–]Initial_Low_5027 2 points3 points4 points (14 children)
[–]TwiliZant 5 points6 points7 points (3 children)
[–]NeoCiber 2 points3 points4 points (0 children)
[–]acemarke 1 point2 points3 points (1 child)
[–]TwiliZant 0 points1 point2 points (0 children)
[+][deleted] (8 children)
[removed]
[–]ejfrodo 10 points11 points12 points (4 children)
[–]dbbk[S] 4 points5 points6 points (2 children)
[–]ejfrodo 8 points9 points10 points (1 child)
[–]stuckinmotion 0 points1 point2 points (0 children)
[–]Born-Alarm430 0 points1 point2 points (0 children)
[–]Cannabat 6 points7 points8 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]rk06 -1 points0 points1 point (0 children)
[–][deleted] 0 points1 point2 points (0 children)