At Sun, 3 Mar 2019 12:58:00 -0500, Jon Zeppieri wrote:
> On Sat, Mar 2, 2019 at 3:38 PM Matthew Flatt <mfl...@cs.utah.edu> wrote:
> > How much memory does the program use, and how much of the run time is
> > GC time?
> >
> 
> How would you measure the former? Use a larger file and monitor the
> process? Or is there a better way within racket? Start a thread that dumps
> current-memory-use every so often?

I'd start with `racket -W "info@GC error"` to get information about
peak memory use. But...

> GC accounts for a bit less than a tenth of the total time, which
> seems to be on par with the parser in the json module.

... that result suggests that memory use isn't going to be interesting.

> I also just realized that I wasn't using profile with errortrace, even
> though I thought I was. I do get much more information with errortrace on.
> It does seem to confirm the hypothesis that a lot of time is spent in
> unknown function calls. (Though I also wonder of errortrace is prohibiting
> any inlining, which would turn many unknown calls into known ones.) Also, a
> good amount of time is spent looping (`for` loops using `in-bytes`, but a
> #:when that uses an unknown predicate).

I think the difference between a direct and indirect call is on the
order of x2, so not enough to explain the differences.

My new guess is that the difference between Racket and Racket CS has
something to do with inlining, since the difference between inlined and
not inlined could explain the gap, and there are all sorts of
opportunities for the compilers to make different choices. Maybe
looking at the output of `raco decomp` for traditional Racket and the
output of setting `PLT_LINKLET_SHOW_CP0` while compiling with Racket CS
would expose some difference related to inlining. Still just a guess.

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to