5 ms·
This article is a follow up to an earlier post (https://blog.pyston.org/2016/06/30/baseline-jit-and-inline-caches/ https://blog.pyston.org/2016/06/30/baseline-j
by ankrgyl 10y ago
This article is a follow up to an earlier post (https://blog.pyston.org/2016/06/30/baseline-jit-and-inline-caches/ https://blog.pyston.org/2016/06/30/baseline-jit-and-inline-c...) which provides additional context. In short, python opcodes are inefficient because they must support a significant amount of dynamicity, even as opposed to some other language peers like JS, PHP, Lua, etc. The original post explains some of the cool stuff they're doing with Pyston (specifically baseline jit and inline caching) to combat it.
- tedmiston 10y agoI don't know a ton about low level language implementation, so excuse me if this comment is misguided, but... Does type hinting in Python 3.x (PEP 484) change this (i.e., reduce the overhead due to dynamicness)? I know it doesn't include runtime type checking, so perhaps it's moot but maybe someone has written an interpreter that does hard type checking either at runtime or through a compilation step.
- ngrilly 10y ago> Does type hinting in Python 3.x (PEP 484) change this No. The type hints are only meant for tooling (type checking, refactoring, documentation, etc.).
- shams93 10y agoThis is also why tensor flow is such a resource hog compared to torch. My mac book pro has intel iris graphics so no cuda, but I was able to get usable results with torch, still struggling to get tensor flow to produce anything useful. Compared to lua python is very hungry, but also Apple is going to need to have a decent GPU option in its new macbook pros to keep people who work on ai projects from bailing for hackingtoshes.