[Python-Dev] [ANN] VPython 0.1

Greg Ewing greg.ewing at canterbury.ac.nz
Thu Oct 23 11:56:09 CEST 2008


Adam Olsen wrote:

> To clarify: This is *NOT* actually a form of threading, is it?

I think the term "threaded code" is being used here in
the sense of Forth, i.e. instead of a sequence of small
integers that are dispatched using a switch statement,
you use the actual machine addresses of the switched-to
code as the virtual instruction opcodes, so the dispatch
is just an indirect jump.

I'm having trouble seeing how that would help with
branch prediction, though -- seems to me it should make
it worse if anything, since the CPU has no idea where
an indirect jump is going to go.

-- 
Greg


More information about the Python-Dev mailing list