This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: hppa build broken


> Does this help with performance on your workstation?  I've checked
> that it does the right thing but it it doesn't seem to help with
> performance on my A550.

There are still problems with the algorithm.  The enclosed little
test program writes junk in just over a minute:

real    1m3.716s
user    0m0.010s
sys     0m6.450s

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)

#include <fcntl.h>
#include <unistd.h>
#define FRAG_SIZE (1024 * 1024)
int
main ()
{
  char buf[FRAG_SIZE];
  int fd, i;

  fd = open ("junk", O_WRONLY|O_CREAT);
  memset (buf, 0, FRAG_SIZE);
  for (i = 1024; i; i--)
    {
      size_t cnt = FRAG_SIZE;
      ssize_t n;
      char *p = buf;

      while (cnt)
	{
	  n = write (fd, p, cnt);
	  if (n == -1)
	    abort ();
	  cnt -= n;
	  p += n;
	}
    }
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]