Why SWC is faster but have smaller compile results than Terser + Babel? #8497
Closed
LikeDreamwalker
started this conversation in
General
Replies: 1 comment 1 reply
-
SWC applies various optimization strategies in combination, brings better outcome for ceratin usecases. We do not have a detailed explanation for each, the best bet is probably reading source codes. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to change my team's Minify plugin to SWC, and we are excited about it.
But here is one thing, we can understand SWC is faster because it can have a good use of multiple cores and threads; but why the compile results' size is also smaller?
I have compared some of the compiled files and found out that SWC seems like it will make the code more concise, but does it have some special and advanced strategy than Terser?
I haven't found any documents or blogs that can explain this. I hope somebody can bring me more info about the SWC's Minify strategy.
Also, I have found a benchmark that can prove that SWC has smaller Minify results:
https://github.com/privatenumber/minification-benchmarks
Beta Was this translation helpful? Give feedback.
All reactions