[pacman-dev] _alpm_list_add_first

Nagy Gabor ngaba at petra.hos.u-szeged.hu
Thu Apr 26 14:40:44 EDT 2007


Hi!

In many cases we use alpm_list as a "stack", or we just use
it as a set. In these cases an O(1) _alpm_list_add_first function would
be more efficient (which add the new member as a first element) than
the O(n) _alpm_list_add. Mostly in time "critical" parts (see my
favorite sortbydeps function for example;-).

Bye, ngaba




More information about the pacman-dev mailing list