[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: better buffer size for copy
From: |
Jim Meyering |
Subject: |
Re: better buffer size for copy |
Date: |
Thu, 24 Nov 2005 08:58:07 +0100 |
Paul Eggert <address@hidden> wrote:
> address@hidden (Robert Latham) writes:
>
>> That's what i thought you'd say. Ok, this patch vs. today's
>> CVS adds buffer-lcm.h and buffer-lcm.c, adds those files to
>> Makefile.am, and makes copy.c call
>> buffer_lcm.
>
> That patch is a reasonable first cut, but it mishandles sparse files
> among other things. I installed the following instead. Thanks for
> prompting us to look into the problem.
>
> 2005-11-23 Paul Eggert <address@hidden>
>
> * src/copy.c: Improve performance a bit by optimizing away
> unnecessary system calls and going to a block size of at least
...
Thanks for handling that.
I see that you too are adding declarations after statements :-)
> {
> + word *wp = NULL;
> +
> + ssize_t n_read = read (source_desc, buf, buf_size);
For the record, we've discussed this before, but now there are
two files in coreutils/src that use the C99 feature allowing
declarations after statements: copy.c and remove.c.
The plan is that people stuck with compilers unable to deal
with that syntax will be able to apply a patch converting to
equivalent c89. It may even happen automatically: if/when
configure detects the lack of a suitable compiler, it'd apply
the c99->c89 patch. The only hitch is that we'll have to maintain
the patch manually, but that shouldn't involve too much work.
- Re: better buffer size for copy, (continued)
- Re: better buffer size for copy, Robert Latham, 2005/11/07
- Re: better buffer size for copy, Paul Eggert, 2005/11/07
- Re: better buffer size for copy, Robert Latham, 2005/11/07
- Re: better buffer size for copy, Robert Latham, 2005/11/18
- Re: better buffer size for copy, Phillip Susi, 2005/11/19
- Re: better buffer size for copy, Robert Latham, 2005/11/20
- Re: better buffer size for copy, Phillip Susi, 2005/11/21
- Re: better buffer size for copy, Robert Latham, 2005/11/22
- Re: better buffer size for copy, Phillip Susi, 2005/11/22
- Re: better buffer size for copy, Paul Eggert, 2005/11/24
- Re: better buffer size for copy,
Jim Meyering <=