cmp: tune 'cmp a b' for GCC x86

Performance problem reported by David Balažic in:
http://lists.gnu.org/archive/html/bug-diffutils/2013-08/msg00013.html
* src/system.h (word): Make it size_t, not uintmax_t.
This sped up plain cmp 90% on my tests (GCC 4.8.1, x86).
This commit is contained in:
Paul Eggert 2013-08-12 16:24:01 -07:00
parent 8f248489eb
commit 9350980d5d

View File

@ -119,10 +119,12 @@ int strcasecmp (char const *, char const *);
#include "propername.h"
#include "version.h"
/* Type used for fast comparison of several bytes at a time. */
/* Type used for fast comparison of several bytes at a time.
This used to be uintmax_t, but changing it to size_t
made plain 'cmp' 90% faster (GCC 4.8.1, x86). */
#ifndef word
# define word uintmax_t
# define word size_t
#endif
/* The integer type of a line number. Since files are read into main