[PATCH] speed up mapping of pnp_ids to description

David Zeuthen david at fubar.dk
Thu Sep 7 09:44:51 PDT 2006


Hi,

Sorry for the lag. I was on vacation.

On Fri, 2006-09-01 at 21:40 +0200, Danny Kukawka wrote:
> Hi,
> 
> this patch replace the current linear search for map a pnp-id to description 
> with a binary search by using bsearch(). This should reduce the needed 
> time/iterations from O(n) (in average O(N/2)) to  O(log n) to find the id 
> (from ~400 ids in the list atm).
> 
> With this patch I added also some new ids to the list.
> 
> Please review.

Looks good to me. Please commit. Thanks!

    David




More information about the hal mailing list