AI 导读
Anthropic 用 Rust 重建了 Messages API,现在每个请求的 CPU 占用减少了约 70%。 Python 拖慢了每个请求,而自 2024 年初以来 API 流量增长了约 1,800 倍。 Claude 用大约一周时间写出了初稿,但证明其行为与 Python 版完全一致则更难。
正文
Anthropic rebuilt its Messages API in Rust, and each request now uses about 70% less CPU.
Python slowed every request, and API traffic has grown roughly 1,800 times since early 2024.
Claude wrote a first draft in about a week, but proving it behaved exactly like Python was harder.
We recently migrated our Messages API from Python to Rust. On our engineering blog, we share how we used the existing service to verify the new one, with teams of Claude agents tracking down and fixing differences between the two versions. https://www.anthropic.com/research/migrating-api-to-rust在 X 查看被引用的帖子
来源:Rohan Paul · x.com