memcoll: clarify sizes versus lengths, document better, and tweak perf
authorPaul R. Eggert <eggert@cs.ucla.edu>
Mon, 12 Jul 2010 17:58:35 +0000 (10:58 -0700)
committerPaul R. Eggert <eggert@lnxsrv01.seas.ucla.edu>
Mon, 12 Jul 2010 17:58:35 +0000 (10:58 -0700)
commit444cc405e1ad5afea49c9757be5a2c31c81804b6
tree8da1e270bc479ae721aa18fb3f9295d5c83f396a
parent088612b229d8e01c9c2e6deef5af7d4477fe2ef0
memcoll: clarify sizes versus lengths, document better, and tweak perf

* lib/memcoll.c (strcoll_loop, memcoll0):
Improve quality of descriptive comments.  Name variables
consistently as to whether they are lengths (which do not include
terminating null) versus sizes (which do).
* lib/xmemcoll.c (xmemcoll0): Likewise.
* lib/memcoll.c (strcoll_loop): Tweak the way that the diff is
returned when s1size == 0; this is easier to compile and saves
about 17% of memcoll's code space on x86-64 with GCC 4.1.2.
ChangeLog
lib/memcoll.c
lib/xmemcoll.c