lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Thu, Nov 18, 2010 at 11:29 AM, David Kastrup <dak@gnu.org> wrote:
>
>> This code kills the CPU predictor and causes severe pipeline flushing.
>
> I have yet to see an alternative that can predict the opcodes.
>

     If you don't need to stick to ANSI C you can use GCC's
first-class labels and goto. It helps the CPU a lot. Or you can use a
new technique I read in paper a few months ago (sorry, don't remember
where it is) where a mix of assembly and subroutine threading is used
to trick the CPU's instruction pointer to follow the VM's, for much
better prediction.

-- 
-alex
http://www.artisancoder.com/