summaryrefslogtreecommitdiff
path: root/lib/libalpm/sha2.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-08-28 23:29:53 -0500
committerDan McGee <dan@archlinux.org>2011-08-29 19:54:18 -0500
commit499e09734bc6f4a121b3363d88aeb085bcfd9ce9 (patch)
tree029709f8e021f17a6f9c57100af92e45b91ff87f /lib/libalpm/sha2.c
parentb3c0ae5205ee9615af077ff00b1a01be3aab4eb6 (diff)
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/sha2.c')
0 files changed, 0 insertions, 0 deletions