-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
On all configurations, the test failed.
Tested on:
- win10 x64
- and lua:
- Lua 5.1.5
- LuaJIT 2.1.1695653777
- Lua 5.3.6 / due to the increased stack size, the number in the test was not 40000, but 900000
local memoize = require('memoize')
local function tri(x)
if x == 0 then return 0 end
return x+tri(x-1)
end
-- print(tri(40000)) -- here we get a stackoverflow, as expected
local memoized_tri = mem(tri)
for i=0, 40000 do
if i % 1000 == 0 then print(i) end
memoized_tri(i) -- here we also get a stackoverflow, but it was expected that there wouldn’t be one
end
print(memoized_tri(40000)) -- we'll never get hereReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels