Conversation
Merging this PR will degrade performance by 21.41%
Performance Changes
Comparing Footnotes
|
30c0921 to
2259fce
Compare
|
Looks like there are still some bugs to work out here with the failing CI... but even then, my preference would be to settle on #5449 first before landing any changes here. Also, since we do utf8 conversions everywhere, not just in TextEncoder::encode, my preference would be to address this more generally. That is, the optimized encoding path -- if we decide it's worthwhile -- should go into |
98afb46 to
f1bbfe6
Compare
7fac631 to
681bf71
Compare
3a6ea76 to
6e3972e
Compare
|
I don't think we need to speed optimize for the broken UTF-16 case unless and until someone shows it matters. The only reason to space-optimize would be to avoid throwing OOM, so if we can guarantee that doesn't happen I'm OK with some temporary blowup in space too. |
|
This helps a lot. I'll push with your changes. Thanks @erikcorry |
* Simplify * Tune slightly * Fix assert * Fix perf regression and OOM read * Handle very tiny output buffers * feedback
1a2eab7 to
9f4fb86
Compare
9f4fb86 to
d43ca36
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5448 +/- ##
==========================================
- Coverage 70.59% 70.58% -0.01%
==========================================
Files 413 414 +1
Lines 109986 110195 +209
Branches 18120 18196 +76
==========================================
+ Hits 77644 77782 +138
- Misses 21531 21546 +15
- Partials 10811 10867 +56 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Improves Next.js benchmarks by 4-7% and WebAssembly applications by 5%
Important disclaimer: Codspeed will not show any improvement (although you can look into previous edits of the codspeed post) because this change is behind an autogate.
Sharing @mhart's benchmark results:
Before:
After:
This is pretty consistent over multiple runs. Seeing 1.04x - 1.07x
Claude is used to write documentation in encoding-test.c++.