| ▲ | simianwords 3 hours ago | ||||||||||||||||||||||
All this but none of the performance benefits. | |||||||||||||||||||||||
| ▲ | __MatrixMan__ 3 hours ago | parent | next [-] | ||||||||||||||||||||||
If your code is talking to an LLM, the performance difference between rust and python represents < 0.1% of the time you spend waiting for computers to do stuff. It's just not an important difference. | |||||||||||||||||||||||
| |||||||||||||||||||||||
| ▲ | 3 hours ago | parent | prev | next [-] | ||||||||||||||||||||||
| [deleted] | |||||||||||||||||||||||
| ▲ | shadowgovt 3 hours ago | parent | prev [-] | ||||||||||||||||||||||
It's true; mypy won't make your Python faster. To get something like that, you'd want to use Common LISP and SBCL; the SBCL compiler can use type assertions to actually throw away code-paths that would verify type expectations at runtime (introducing undefined behavior if you violate the type assertions). It's pretty great, because you can run it in debug mode where it will assert-fail if your static type assertions are violated, or in optimized mode where those checks (and the code to support multiple types in a variable) go away and instead the program just blows up like a C program with a bad cast does. | |||||||||||||||||||||||
| |||||||||||||||||||||||