[PATCH v1 2/2] misc: Replace strcmp with memcmp when it obviously works

2022-04-21 Thread Noah Goldstein
memcmp is always faster than strcmp. The change in the `a_word` comparison function is the most important. All tests pass: ``` $> git clean -xf; ./bootstrap && ./configure && make check ... 977 Tests in 132 Categories Complete ... No Failures :-) =

[PATCH v1 1/2] hash: Remove unnecessary `isupper` check before `tolower`

2022-04-21 Thread Noah Goldstein
tolower only modifies the character if there is a valid lower conversion: https://linux.die.net/man/3/tolower: ``` The value returned is that of the converted letter, or c if the conversion was not possible. ``` Both `isupper` and `tolower` are implemented with essentially the same lookup table s