I updated the vite vs next/turbo benchmark by using swc to transform React refresh for vite. To avoid confusion, I have deleted the previous two tweets with outdated numbers.
Latest numbers:
- root: vite 338.2ms / next 334.6ms
- leaf: vite 141.8ms / next 84.4ms
The swc transform helps a lot in the root component case because the file is big, and previously cost 300ms in babel transforms alone. This makes vite almost exactly the same speed with turbopack.
Interestingly, in leaf scenarios turbopack is still 69% faster - this entails that Vite HMR actually caught up with turbopack as the file gets bigger, potentially scaling better in larger apps.
Because we are now testing the HMR of the same framework with the same set of transforms, the result is more relevant for other frameworks compared to previously posted numbers.
Just to add a bit of context - in this benchmark, even before using swc for React transforms, turbo is only 2x compared to vite (compared to marketed 10x). So the difference wasn’t that drastic to begin with.
Thanks for updating the repo.
Here's my updated numbers
It seems that vite is atleast 2x faster than turbopack (both using swc).
I encourage others to run the benchmark as it is dependent on the platform/hardware of the system that the benchmark is run on.