pacman/lib/libalpm
Dan McGee 0b9cd9448c pkghash improvements/modifications
This patch changes a variety of small things related to our pkghash
implementation with an eye toward performance, especially on native
32-bit systems.

* Use `unsigned int` rather than `size_t` for hash sizes. We already
  return ERANGE for any attempted creation of a hash greater than 1
  million elements, so unsigned int is more than large enough for our
  purposes. Switching to this type allows 32 bit systems to do native
  math without helper functions from libgcc.
* _alpm_pkghash_create() now internally adds extra padding for
  additional array elements, rather than that being the responsibility of
  the caller.
* #define values are moved into static const values in pkghash.c; a new
  `stride` value is also extracted (but remains set at 1).
* Division and modulus operators are removed from the normal find and
  add paths if possible. We store the upper limit of the number of
  elements in the hash so we no longer need to calculate this every
  element addition. When doing wraparound position calculations, we only
  apply the modulus operator if the value is greater than the number of
  buckets.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-02 19:41:42 -06:00
..
po Update translations from Transifex 2011-11-16 14:45:25 -06:00
.gitignore Remove unnecessary entries from .gitignore files 2007-07-16 16:49:28 -04:00
add.c include config.h via Makefiles 2011-12-21 18:13:17 -06:00
add.h Rename pmhandle_t to alpm_handle_t 2011-06-28 14:04:00 +10:00
alpm.c include config.h via Makefiles 2011-12-21 18:13:17 -06:00
alpm.h add key algo to import msg 2011-11-20 21:40:19 -06:00
alpm_list.c alpm_list_msort: inline alpm_list_nth() call 2012-01-02 12:58:51 -06:00
alpm_list.h Remove alpm_list_getdata wrapper function 2011-10-12 14:22:49 -05:00
backup.c include config.h via Makefiles 2011-12-21 18:13:17 -06:00
backup.h Allow fileconflict if unowned file moving into backup array 2011-07-14 15:34:04 -05:00
base64.c base64: don't compile base64_encode() function 2011-10-17 12:03:02 -05:00
base64.h base64: don't compile base64_encode() function 2011-10-17 12:03:02 -05:00
be_local.c pkghash improvements/modifications 2012-01-02 19:41:42 -06:00
be_package.c be_package.c: fix compiler warning 2012-01-02 12:58:51 -06:00
be_sync.c pkghash improvements/modifications 2012-01-02 19:41:42 -06:00
conflict.c include config.h via Makefiles 2011-12-21 18:13:17 -06:00
conflict.h Convert package filelists to an array instead of linked list 2011-07-21 15:04:30 -05:00
db.c include config.h via Makefiles 2011-12-21 18:13:17 -06:00
db.h Introduce alpm_time_t type 2011-10-12 14:01:25 -05:00
delta.c Only compile delta regex once 2012-01-02 12:55:55 -06:00
delta.h Only compile delta regex once 2012-01-02 12:55:55 -06:00
deps.c include config.h via Makefiles 2011-12-21 18:13:17 -06:00
deps.h Be more robust when copying package data 2011-08-19 11:09:57 -05:00
diskspace.c include config.h via Makefiles 2011-12-21 18:13:17 -06:00
diskspace.h diskspace: add _alpm_check_downloadspace() 2011-10-17 08:39:04 -05:00
dload.c include config.h via Makefiles 2011-12-21 18:13:17 -06:00
dload.h sync: extract build_payload() method from find_dl_candidates 2011-10-21 19:29:31 -05:00
error.c include config.h via Makefiles 2011-12-21 18:13:17 -06:00
graph.c include config.h via Makefiles 2011-12-21 18:13:17 -06:00
graph.h include config.h via Makefiles 2011-12-21 18:13:17 -06:00
group.c include config.h via Makefiles 2011-12-21 18:13:17 -06:00
group.h Rename internal functions with grp in their name 2011-06-29 15:52:33 +10:00
handle.c Only compile delta regex once 2012-01-02 12:55:55 -06:00
handle.h Only compile delta regex once 2012-01-02 12:55:55 -06:00
log.c include config.h via Makefiles 2011-12-21 18:13:17 -06:00
log.h Rename pmloglevel_t to alpm_loglevel_t 2011-06-28 23:28:24 +10:00
Makefile.am include config.h via Makefiles 2011-12-21 18:13:17 -06:00
md5.c Update MD5 routines with changes from PolarSSL 2011-08-11 20:17:21 -05:00
md5.h Update MD5 routines with changes from PolarSSL 2011-08-11 20:17:21 -05:00
package.c include config.h via Makefiles 2011-12-21 18:13:17 -06:00
package.h include config.h via Makefiles 2011-12-21 18:13:17 -06:00
pkghash.c pkghash improvements/modifications 2012-01-02 19:41:42 -06:00
pkghash.h pkghash improvements/modifications 2012-01-02 19:41:42 -06:00
rawstr.c include util.h in rawstr.c 2011-07-05 22:36:40 -05:00
remove.c Remove unnecessary counters in file removal code 2012-01-02 12:58:51 -06:00
remove.h Be smarter about running ldconfig during removal transactions 2011-09-19 13:18:42 -05:00
sha2.c Add sha2 (sha256) routines from PolarSSL 2011-08-15 07:07:13 -05:00
sha2.h Add sha2 (sha256) routines from PolarSSL 2011-08-15 07:07:13 -05:00
signing.c include config.h via Makefiles 2011-12-21 18:13:17 -06:00
signing.h signing: add a process and retry loop for database signatures 2011-09-20 10:23:11 -05:00
sync.c include config.h via Makefiles 2011-12-21 18:13:17 -06:00
sync.h Rename pmhandle_t to alpm_handle_t 2011-06-28 14:04:00 +10:00
trans.c include config.h via Makefiles 2011-12-21 18:13:17 -06:00
trans.h Refactor _alpm_runscriptlet() 2011-09-30 10:55:58 -05:00
util.c Simplify hash function to a single multiplication 2011-12-31 21:03:24 -06:00
util.h Remove strtrim function from backend 2011-12-23 14:37:03 -06:00
version.c include config.h via Makefiles 2011-12-21 18:13:17 -06:00