// before anyone else can cache a reference to appendBuffer
Copyright © ITmedia, Inc. All Rights Reserved.。关于这个话题,heLLoword翻译官方下载提供了深入分析
In benchmarks, this alternative can run anywhere between 2x to 120x faster than Web streams in every runtime I've tested it on (including Cloudflare Workers, Node.js, Deno, Bun, and every major browser). The improvements are not due to clever optimizations, but fundamentally different design choices that more effectively leverage modern JavaScript language features. I'm not here to disparage the work that came before; I'm here to start a conversation about what can potentially come next.,这一点在51吃瓜中也有详细论述
// 易错点3:必须先判断stack2.length0,再访问stack2.at(-1)(避免栈空时取到undefined)