Closed alfa07 closed 2 years ago
The function assumes no aliasing when there is one.
Test case (alen.lua):
local t = {} local ta = t local s = 0 for i = 1, 1000 do ta[i] = i s = s + #t end print(s)
Running the test case without fix:
$ luajit -j off alen.lua 500500 $ luajit -j on alen.lua 339799
After fix:
$ luajit -j off alen.lua 500500 $ luajit -j on alen.lua 500500
Thank you for your report. Will merge changes from the upstream repo.
The function assumes no aliasing when there is one.
Test case (alen.lua):
Running the test case without fix:
After fix: