This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Speed up profile reading/writing
- From: Richard Henderson <rth at redhat dot com>
- To: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- Cc: gcc-patches at gcc dot gnu dot org, jh at suse dot cz
- Date: Thu, 27 Feb 2003 18:15:09 -0800
- Subject: Re: [PATCH] Speed up profile reading/writing
- References: <20030227011632.GA22595@atrey.karlin.mff.cuni.cz>
On Thu, Feb 27, 2003 at 02:16:32AM +0100, Zdenek Dvorak wrote:
> the linux kernel does not cope well with a lot of small reads and writes
> produced by the profiling code. This gets significant if instrumented
> program is large and runs for only small amount of time -- profiling
> gcc spends about 50% of time in system when compiling testsuite during
> profiledbootstrap. This patch makes the program to read/write the whole
> .da files at once, thus improving speed in this case (admitedly
> patological one) by about 30%.
Given that we're using stdio already, isn't all this equivalent
to calling setvbuf(file, buf, _IOFBF, large)? Or does fseek for
some reason flush the input buffer?