#1195·Bend

一个通用函数在设备堆中包装了一个 Data 记录:两个记录的 Bool.pick 操作使 Metal 的编译时间从 8 秒延长到 11 分钟以上

作者: AdrielSantana创建于 2026年9月29日更新于 2026年9月29日

A generic def over a Data record, `Bool.pick` included, boxes the record on the device heap in flat code. Every call site then inlines the heap's allocation, `term_drop`'s walk, and `ctr_take`. In a large kernel, this took Metal's compiler from 8 seconds to more than 11 minutes.

内容来源: HigherOrderCO/Bend