You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Device lane spill: a loop at the exact fill depth spills and restores the whole stack on every call (~200x slower) #1790
Since #1439, a ! job whose lane stack fills moves the words below the calling def to a heap block and moves them all back when it returns to that point. If code keeps calling right at the depth where the stack fills, each call spills about 2,048 words and each return restores them, so the lane comes back full every time.
All three print the right result. Before #1439, depths like this faulted, so this is not a regression; it is the cost model of the spill.
A fix would spill only the bottom part of the stack, so that a restore leaves room. The hard part is that the exit frame must sit on a frame boundary, and at runtime the lane does not know where its frames start and end: each frame's size depends on its segment. Spilling part of the stack needs either frame sizes recorded on the stack or per-segment size tables to walk it.
Activity