diff options
author | Dan McGee <dan@archlinux.org> | 2011-08-28 23:29:53 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-08-29 19:54:18 -0500 |
commit | 499e09734bc6f4a121b3363d88aeb085bcfd9ce9 (patch) | |
tree | 029709f8e021f17a6f9c57100af92e45b91ff87f /lib/libalpm/pkghash.h | |
parent | b3c0ae5205ee9615af077ff00b1a01be3aab4eb6 (diff) | |
download | pacman-499e09734bc6f4a121b3363d88aeb085bcfd9ce9.tar.xz |
Streamline alpm_splitdep() comparisons
This reduces from 5 to 3 the number of searches needed on the string
looking for a comparison operator, since we can so a second quick
comparison looking for '=' if we find '<' or '>'. It also makes every
search doable with strchr() or memchr() rather than the slower strstr()
method.
In testing, only 10% of splitdep calls (~1600 / 16000) during an -Ss
database load found a version comparison operator, so optimizing the not
found path to be require less work makes sense.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/pkghash.h')
0 files changed, 0 insertions, 0 deletions