Hacker News new | ask | show | jobs
by whalesalad 832 days ago
What about Python performance is awful in AI? All of the hard stuff is delegated to a C library or the GPU.
2 comments

Python makes it hard to get this right. Simple idioms result in copies of large collections or other work shifting from C to Python. The state-of-the-art of Python profiling [1] has to target this problem to the exclusion of other concerns.

[1]: https://www.thestrangeloop.com/2022/python-performance-matte...

There's tons of glue code that gets written in Python.