On 8/9/2020 1:20 AM, wanp...@gmail.com 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 -- 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 racket-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/8499ad0d-a5a7-424b-1027-df25b255bc61%40comcast.net.