Branchless Rust: Making a Filter 4x Faster by Removing an If
无分支Rust:通过移除If让过滤器速度快4倍
HN 225 分 · 69 条评论 · 作者 greyblake · 来源 www.greyblake.com · HN 讨论
【摘要】
原文抓取失败,摘要暂不可用,请访问原文链接。
【评论】共 82 条 · 按 HN 热度顺序 · 楼中楼缩进展示
1L @anematode · 2026-08-06 12:03
Nice post!
You can do even a bit better if you're willing to use intrinsics. In particular this kind of operation is well-suited for compress-type operations, available as a first-class operation in at least AVX512, SVE and RVV; you can also emulate them reasonably quickly on NEON and AVX2.
⋯ 继续阅读请登录会员 ⋯