GreptimeDB 的 Rust 性能经验:一次堆分配可能比移动 4.6 KB async stream 状态更划算
RT Dennis Zhuang: A Rust perf lesson from GreptimeDB: one heap allocation can be cheaper than moving 4.6 KB of async stream state around. https://gith...
AI 导读
Dennis Zhuang 分享 GreptimeDB 的一条 Rust 性能优化经验:与其在异步调用中来回移动 4.6 KB 的 async stream 状态,不如做一次堆分配,后者反而更便宜。这条经验说明避免大状态值频繁移动有时比节省堆分配更值得优化。
来源:@yihong0618 · x.com