Jump to content


String table for fast comparison of static strings


20 replies to this topic

#21 hammer

    New Member

  • Members
  • Pip
  • 7 posts

Posted 12 January 2011 - 12:58 AM

Do these string IDs vary in length?

The string length check would only help speed up collisions for strings that vary in length, like filepaths.
If you have something like a database of 20-digit serial numbers, for example, that don't vary in length,
then this check would do nothing to resolve collisions.

And memcmp() is only slightly faster than strcmp(), since it doesn't need to check the ending NULL.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users