VirtualBox

Changeset 1833 in kBuild for trunk


Ignore:
Timestamp:
Oct 11, 2008 5:14:02 PM (16 years ago)
Author:
bird
Message:

kmk: Obvious optimization in file_hash_cmp.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk/file.c

    r1797 r1833  
    5656file_hash_cmp (const void *x, const void *y)
    5757{
     58#ifdef KMK
     59 /* since the names live in the strcache, there is a raging likelylood
     60    that we'll match on the string pointer.  Which is wee bit faster...  */
     61 struct file const *xf = ((struct file const *) x);
     62 struct file const *yf = ((struct file const *) y);
     63  if (xf->hname == yf->hname)
     64    return 0;
     65  return_ISTRING_COMPARE (xf->hname, yf->hname);
     66#else
    5867  return_ISTRING_COMPARE (((struct file const *) x)->hname,
    5968                          ((struct file const *) y)->hname);
     69#endif
    6070}
    6171
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette