[Python-ideas] Do we need non-heap types any more? (Was: Implicit submodule imports)

Sturla Molden sturla.molden at gmail.com
Sun Sep 28 18:44:31 CEST 2014


Andrew Barnert <abarnert at yahoo.com.dmarc.invalid>
wrote:
 
> Well, there's obviously a non-zero performance cost to doing all this
> stuff with all types. Of course there's also a non-zero cost to checking
> the heap-type-ness of all types. And both costs may be so minimal they're
> hard to even measure.
> 

With branch prediction on a modern CPU an "if unlikely()" can probably push
it down to inpunity. Both the Linux kernel and Cython does this liberally.

Sturla



More information about the Python-ideas mailing list