Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The problem with interpreting the Python way, using a switch loop ceval.c is that there is plenty of overhead with that loop. Branch prediction fails. It could be every opcode is compared before reaching the actual opcode in the switch.

I wonder if Python will ever take the JVM approach of having a TemplateInterpreter and mapping each bytecode to assembly directly. Of course you would have to do it for each platform.

http://openjdk.java.net/groups/hotspot/docs/RuntimeOverview....



Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: