Re: [coreutils] [PATCH] sort: -R now uses less memory on long lines with internal NULs

2010-08-11 Thread Paul Eggert
On 08/12/10 00:49, Pádraig Brady wrote: > Is it uint32_t for alignment (speed)? >From sort's point of view, it's uint32_t because that's what the md5 library specifies. I haven't looked into md5 and don't know if it could be sped up by assuming 64-bit integers. > Would it be worth doing a memcm

Re: [coreutils] [PATCH] sort: -R now uses less memory on long lines with internal NULs

2010-08-11 Thread Pádraig Brady
On 05/08/10 00:12, Paul Eggert wrote: > @@ -2038,41 +2027,117 @@ static int > compare_random (char *restrict texta, size_t lena, > char *restrict textb, size_t lenb) > { > - int diff; > + uint32_t dig[2][MD5_DIGEST_SIZE / sizeof (uint32_t)]; I know this is just moved code but

[coreutils] [PATCH] sort: -R now uses less memory on long lines with internal NULs

2010-08-04 Thread Paul Eggert
* lib/Makefile.am (libcoreutils_a_SOURCES): Remove xmemxfrm.c, xmemxfrm.h. * lib/memxfrm.c, lib/memxfrm.h, lib/xmemxfrm.c, lib/xmemxfrm.h: Remove. * m4/memxfrm.m4: Likewise. * m4/prereq.m4 (gl_PREREQ): Remove gl_MEMXFRM. * po/POTFILES.in: Remove lib/xmemxfrm.c. * src/sort.c: Don't include xmemxfrm.