Oh, I got it. Thank you for the explanation!

George Neuner <[email protected]> 於 2020年8月9日 週日 下午1:35寫道:

>
> On 8/9/2020 1:20 AM, [email protected] wrote:
> >
> > One more thing which bothers me is if I put a (collect-garbage) in
> > front of the testing, I got gc time: 0 if not I got gc time: 9.
> > Why can't 1 gc reclaim all memory during execution while it can before
> > executes?
>
> Those numbers show *time* spent working, not what was done.  If you
> collect before running your program, at that point little has been
> allocated, and little or nothing has been freed, and so the GC has
> little to do ... hence it spends '0' time doing it  [zero meaning below
> the resolution of the computer's clock].  Once your program starts
> running, memory is being allocated and freed, and so a GC in the middle
> or at the end has much more work to do.
>
> George
>
>
>

-- 
- sleepnova
呼叫小黃創辦人 & CEO

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CABa2-7PZ_Yhr7_5nqTjBA09hExyWOdM0gyQAvuOhGFb8XwbivA%40mail.gmail.com.

Reply via email to