Brian,

The Racket profiler is an edge profiler. So in addition to telling you
which code time is spent in, it's also telling you which callers caused
which proportion of that time.

In the case of [48], it's telling you that file output is a significant
bottleneck, and that it's caused by the code at [2], [38], [39], etc.
(as well as by recursive calls to `call-with-output-file`).

As for the `for` ([49]), the loops at [40] and [37] are the main
culprits.

Based on that, you could try redirecting output to `open-output-nowhere`
if you want to profile your computation (as opposed to output), or you
could try batching your output (fewer, larger `printf`s instead of many
small ones) to reduce the cost of output.

Vincent




On Sat, 16 Jan 2016 16:51:04 -0600,
Brian Adkins wrote:
> 
> I'm not sure if something changed with 6.3, but I have the output of:
> 
> racket -l errortrace -t parser.rkt
> 
> in the following gist:
> 
> https://gist.githubusercontent.com/lojic/9cd8a3a88ef2e110b9de/raw/79e9892326101333d11987c8e3a3b9df93adc63a/profile%2520output
> 
> I'm having trouble understanding the output. For example, I see that [48] ... 
> (49.6%)  is probably an area I need to look at, but I can't tell what part of 
> my code I should look at from that output. Likewise for the 19.4% reported 
> for "for".
> 
> Any ideas?
> 
> Thanks,
> Brian
> 
> -- 
> 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].
> For more options, visit https://groups.google.com/d/optout.

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

Reply via email to