r/DIY_Geeks • • 2d ago

Anthropic Moves Claude’s Messages API From Python to Rust, Cutting CPU Use by About 70%

https://pbxscience.com/anthropic-moves-claudes-messages-api-from-python-to-rust-cutting-cpu-use-by-about-70/

Anthropic Moves Claude’s Messages API From Python to Rust, Cutting CPU Use by About 70%.

Anthropic has completed a migration of its Messages API from Python to Rust without taking the service offline....

3 Upvotes

4 comments sorted by

1

u/zackel_flac 22h ago

Just code it into assembly at that stage, why the need for high level languages designed for human? C would have even been a better choice.

1

u/Typical-Magazine480 11h ago

Ideologically biased comment

1

u/zackel_flac 9h ago

Just being pragmatic here, Rust is just used as a marketing and cool looking thing to do. If under the hood you're just using unsafe code all over the place, which is exactly what Claude produces these days, then why even bother?

1

u/ignorantpisswalker 4h ago

Tokens. And training.

LLMs are trained in python rust, so they can spit it easier. If you do want assembly - not only it will take lots of tokens, but no high level optimizations will be done (as gcc/clang/cl do).