next.js
249f413b - perf(turbopack): Use `Byte::from_static` when possible (#79215)

Commit
349 days ago
perf(turbopack): Use `Byte::from_static` when possible (#79215) ### What? Use the `Bytes::from_static` method, which does not allocate at all. As the lifetime dispatch is unsound, `Bytes as From<&[u8]>` is very unlikely to be able to optimize it as `Bytes::from_static`. ### Why? x-ref: Numbers at https://vercel.slack.com/archives/C06PPGZ0FD3/p1747238443434299?thread_ts=1746834549.272939&cid=C06PPGZ0FD3
Author
Parents
Loading