logoalt Hacker News

mahboi • yesterday at 11:56 PM • 1 reply • view on HN

Does optional/gradual typing even help with JIT?


Replies

procaryote • today at 7:45 AM

If you know the type you need fewer checks in the jitted code, and you can optimise to native types.

If it helps python specifically, given that the types themselves are pretty dynamic, who knows. A python integer doesn't map well to a native integer etc. Python really isn't designed for performance, and retrofitting it is hard.