fix: use Buffer.indexOf in uint8array helpers for faster byte scanning (3/8)#89864
Merged
timneutkens merged 1 commit intocanaryfrom Feb 19, 2026
Merged
fix: use Buffer.indexOf in uint8array helpers for faster byte scanning (3/8)#89864timneutkens merged 1 commit intocanaryfrom
timneutkens merged 1 commit intocanaryfrom
Conversation
This was referenced Feb 11, 2026
Contributor
Author
This was referenced Feb 11, 2026
51fb637 to
4e5afea
Compare
2 tasks
4803d02 to
b05d013
Compare
4e5afea to
ab734ba
Compare
Collaborator
Stats from current PR🔴 1 regression
📊 All Metrics📖 Metrics GlossaryDev Server Metrics:
Build Metrics:
Change Thresholds:
⚡ Dev Server
📦 Dev Server (Webpack) (Legacy)📦 Dev Server (Webpack)
⚡ Production Builds
📦 Production Builds (Webpack) (Legacy)📦 Production Builds (Webpack)
📦 Bundle SizesBundle Sizes⚡ TurbopackClient Main Bundles: **398 kB** → **398 kB** ✅ -8 B80 files with content-based hashes (individual files not comparable between builds) Server Middleware
Build DetailsBuild Manifests
📦 WebpackClient Main Bundles
Polyfills
Pages
Server Edge SSR
Middleware
Build DetailsBuild Manifests
Build Cache
🔄 Shared (bundler-independent)Runtimes
📝 Changed Files (10 files)Files with changes:
View diffsapp-page-exp..ntime.dev.jsDiff too large to display app-page-exp..time.prod.jsDiff too large to display app-page-tur..ntime.dev.jsDiff too large to display app-page-tur..time.prod.jsDiff too large to display app-page-tur..ntime.dev.jsDiff too large to display app-page-tur..time.prod.jsDiff too large to display app-page.runtime.dev.jsDiff too large to display app-page.runtime.prod.jsDiff too large to display pages-api-tu..time.prod.jsDiff too large to display pages-turbo...time.prod.jsDiff too large to display |
timneutkens
approved these changes
Feb 12, 2026
ab734ba to
ab5300e
Compare
73b30b4 to
dac7602
Compare
ab5300e to
38a8b92
Compare
38a8b92 to
abd151e
Compare
Member
|
Ran the benchmark again. It's a win even without webstreams->node streams. So going to merge this PR. Before: After: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Use
Buffer.indexOfwhen available inuint8array-helpers.tsfor faster byte sequence scanning. Falls back to the existing manual loop on non-Node environments.Test plan
pnpm test-unit test/unit/stream-utils/uint8array-helpers.test.tspasses