[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: LuaJIT with vectors
- From: Alex Queiroz <asandroq@...>
- Date: Thu, 18 Nov 2010 11:26:39 -0200
On Thu, Nov 18, 2010 at 11:17 AM, David Kastrup <firstname.lastname@example.org> wrote:
> Alex Queiroz <email@example.com> writes:
>> Sometimes I wonder how plain Lua can be so fast sticking only to
>> standard ANSI C. That's an achievement. For instance, the VM dispatch
>> uses the C switch statement, which is known to be slow.
> Huh? Why would it be "known to be slow"? Have you taken a look at the
> kind of code it generates?
The standards-compliant switch statement must emit code to check
interval range. This code kills the CPU predictor and causes severe