lua-users home
lua-l archive

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

On Mon, Nov 16, 2009 at 6:27 PM, Mike Pall <> wrote:
> Duncan Cross wrote:
>> What happens for me is
>> the final assertion fails, and reading back the pairs of values, in a lot of
>> cases towards the end, the first number is not zero or nil but the second
>> value *is* zero (which shouldn't be possible):
> Thank you for the report and the test case! It's a bug in the
> bytecode generation for some conditionals, which shows only in
> compiled code. Patch attached.

Great! Now all the tests run perfectly. (And, of course, quickly.)

> BTW: You'll get better performance if you don't fill the rd[]
> array backwards. It degrades into a hash table in this case.
> You could just do a quick forward fill before the loop:
>  for j=start,finish do rd[j] = 0 end

Ah, yeah, good point. Thanks!