Optimization fun

H. S. Teoh via Digitalmars-d digitalmars-d at puremagic.com
Sat Nov 8 07:26:23 PST 2014


On Sat, Nov 08, 2014 at 02:29:25AM +0000, Kiith-Sa via Digitalmars-d wrote:
[...]
> Except for very specific cases, neither gprof or DMD's profiler are
> good for profiling. If you're on Linux, you have perf, which works
> well with D and is way ahead of anything the DMD profiler will be able
> to do *after* man-years of further development.
> 
> See (shameless advertisement):
> 
> http://defenestrate.eu/_static/profiling-slides/index.html#22
> 
> (especially perf record/perf report)

The slides mention not to use gprof, but never explain why?

Also, the recommendations are kinda not what I'm looking for; I'm not
looking so much for interactive performance (trying to optimize branch
predictions, etc.), because I'm anticipating that in the future, most of
the problems I'll be running will be I/O bound because the size of the
problems will *far* exceed available RAM. Mispredicted branches or L1/L2
cache misses are kinda irrelevant in this scenario. Or at least, they're
not as important as they're made out to be, since what will matter more
is how to minimize disk seeks and how to keep frequently-accessed cached
disk pages in the CPU cache. So it's still somewhat relevant, just not
as much as other applications like interactive games.


T

-- 
Windows: the ultimate triumph of marketing over technology. -- Adrian von Bidder


More information about the Digitalmars-d mailing list