←back to thread

597 points pizlonator | 1 comments | | HN request time: 0s | source
Show context
gleenn ◴[] No.45134958[source]
> The only "pause" threads experience is the callback executed in response to the soft handshake, which does work bounded by that thread's stack height.

So this is probably not great for functional/deeply-recursive code I guess?

replies(1): >>45134968 #
pizlonator ◴[] No.45134968[source]
Meh.

The stack scan is really fast. There's not a lot of logic in there. If you max out the stack height limit (megabytes of stack?) then maybe that means milliseconds of work to scan that stack. That's still not bad.

replies(1): >>45134985 #
adastra22 ◴[] No.45134985[source]
That's a very long time. Milliseconds of work is an entire frame update-render cycle in a modern game.
replies(3): >>45135001 #>>45135013 #>>45135161 #
munificent ◴[] No.45135013[source]
Games don't tend to have very deep callstacks. And if a game cared about performance also wanted to use GC, it would probably try to run the GC at the end of a frame when there is little on the stack.
replies(2): >>45135039 #>>45135228 #
1. adastra22 ◴[] No.45135228[source]
FUGC runs the GC in a separate thread and you don’t have a lot of control over when it interrupts.