No heap allocations of size, 1, 2, and 4, and none of the garbage that
res[realIdx] = stack.length ? stack.at(-1) : -1;
。关于这个话题,谷歌浏览器【最新下载地址】提供了深入分析
zhuanlan.zhihu.com/p/198274063…
Opens in a new window
Nature, Published online: 25 February 2026; doi:10.1038/d41586-026-00040-x