mirror of
https://https.git.savannah.gnu.org/git/diffutils.git
synced 2026-01-27 09:54:25 +00:00
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:
parent
8f248489eb
commit
9350980d5d
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user