Changeset 1915 for trunk/src/kmk/strcache2.c
- Timestamp:
- Oct 22, 2008, 11:59:51 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/strcache2.c
r1913 r1915 686 686 assert (!cache->case_insensitive); 687 687 688 cache->lookup_count++;688 MAKE_STATS (cache->lookup_count++); 689 689 690 690 /* Lookup the entry in the hash table, hoping for an … … 696 696 if (strcache2_is_equal (cache, entry, str, length, hash)) 697 697 return (const char *)(entry + 1); 698 cache->collision_1st_count++;698 MAKE_STATS (cache->collision_1st_count++); 699 699 700 700 entry = entry->next; … … 703 703 if (strcache2_is_equal (cache, entry, str, length, hash)) 704 704 return (const char *)(entry + 1); 705 cache->collision_2nd_count++;705 MAKE_STATS (cache->collision_2nd_count++); 706 706 707 707 /* Loop the rest. */ … … 713 713 if (strcache2_is_equal (cache, entry, str, length, hash)) 714 714 return (const char *)(entry + 1); 715 cache->collision_3rd_count++;715 MAKE_STATS (cache->collision_3rd_count++); 716 716 } 717 717 /* not reached */ … … 734 734 #endif /* NDEBUG */ 735 735 736 cache->lookup_count++;736 MAKE_STATS (cache->lookup_count++); 737 737 738 738 /* Lookup the entry in the hash table, hoping for an … … 744 744 if (strcache2_is_equal (cache, entry, str, length, hash)) 745 745 return (const char *)(entry + 1); 746 cache->collision_1st_count++;746 MAKE_STATS (cache->collision_1st_count++); 747 747 748 748 entry = entry->next; … … 751 751 if (strcache2_is_equal (cache, entry, str, length, hash)) 752 752 return (const char *)(entry + 1); 753 cache->collision_2nd_count++;753 MAKE_STATS (cache->collision_2nd_count++); 754 754 755 755 /* Loop the rest. */ … … 761 761 if (strcache2_is_equal (cache, entry, str, length, hash)) 762 762 return (const char *)(entry + 1); 763 cache->collision_3rd_count++;763 MAKE_STATS (cache->collision_3rd_count++); 764 764 } 765 765 /* not reached */ … … 776 776 assert (!cache->case_insensitive); 777 777 778 cache->lookup_count++;778 MAKE_STATS (cache->lookup_count++); 779 779 780 780 /* Lookup the entry in the hash table, hoping for an … … 786 786 if (strcache2_is_equal (cache, entry, str, length, hash)) 787 787 return (const char *)(entry + 1); 788 cache->collision_1st_count++;788 MAKE_STATS (cache->collision_1st_count++); 789 789 790 790 entry = entry->next; … … 793 793 if (strcache2_is_equal (cache, entry, str, length, hash)) 794 794 return (const char *)(entry + 1); 795 cache->collision_2nd_count++;795 MAKE_STATS (cache->collision_2nd_count++); 796 796 797 797 /* Loop the rest. */ … … 803 803 if (strcache2_is_equal (cache, entry, str, length, hash)) 804 804 return (const char *)(entry + 1); 805 cache->collision_3rd_count++;805 MAKE_STATS (cache->collision_3rd_count++); 806 806 } 807 807 /* not reached */ … … 820 820 assert (!cache->case_insensitive); 821 821 822 cache->lookup_count++;822 MAKE_STATS (cache->lookup_count++); 823 823 824 824 /* Lookup the entry in the hash table, hoping for an … … 830 830 if (strcache2_is_equal (cache, entry, str, length, hash)) 831 831 return (const char *)(entry + 1); 832 cache->collision_1st_count++;832 MAKE_STATS (cache->collision_1st_count++); 833 833 834 834 entry = entry->next; … … 837 837 if (strcache2_is_equal (cache, entry, str, length, hash)) 838 838 return (const char *)(entry + 1); 839 cache->collision_2nd_count++;839 MAKE_STATS (cache->collision_2nd_count++); 840 840 841 841 /* Loop the rest. */ … … 847 847 if (strcache2_is_equal (cache, entry, str, length, hash)) 848 848 return (const char *)(entry + 1); 849 cache->collision_3rd_count++;849 MAKE_STATS (cache->collision_3rd_count++); 850 850 } 851 851 /* not reached */ … … 868 868 #endif /* NDEBUG */ 869 869 870 cache->lookup_count++;870 MAKE_STATS (cache->lookup_count++); 871 871 872 872 /* Lookup the entry in the hash table, hoping for an … … 878 878 if (strcache2_is_equal (cache, entry, str, length, hash)) 879 879 return (const char *)(entry + 1); 880 cache->collision_1st_count++;880 MAKE_STATS (cache->collision_1st_count++); 881 881 882 882 entry = entry->next; … … 885 885 if (strcache2_is_equal (cache, entry, str, length, hash)) 886 886 return (const char *)(entry + 1); 887 cache->collision_2nd_count++;887 MAKE_STATS (cache->collision_2nd_count++); 888 888 889 889 /* Loop the rest. */ … … 895 895 if (strcache2_is_equal (cache, entry, str, length, hash)) 896 896 return (const char *)(entry + 1); 897 cache->collision_3rd_count++;897 MAKE_STATS (cache->collision_3rd_count++); 898 898 } 899 899 /* not reached */ … … 910 910 assert (!cache->case_insensitive); 911 911 912 cache->lookup_count++;912 MAKE_STATS (cache->lookup_count++); 913 913 914 914 /* Lookup the entry in the hash table, hoping for an … … 920 920 if (strcache2_is_equal (cache, entry, str, length, hash)) 921 921 return (const char *)(entry + 1); 922 cache->collision_1st_count++;922 MAKE_STATS (cache->collision_1st_count++); 923 923 924 924 entry = entry->next; … … 927 927 if (strcache2_is_equal (cache, entry, str, length, hash)) 928 928 return (const char *)(entry + 1); 929 cache->collision_2nd_count++;929 MAKE_STATS (cache->collision_2nd_count++); 930 930 931 931 /* Loop the rest. */ … … 937 937 if (strcache2_is_equal (cache, entry, str, length, hash)) 938 938 return (const char *)(entry + 1); 939 cache->collision_3rd_count++;939 MAKE_STATS (cache->collision_3rd_count++); 940 940 } 941 941 /* not reached */
Note:
See TracChangeset
for help on using the changeset viewer.