This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit 9dfcf13
committed
rustdoc-search: better hashing, faster unification
The hash changes are based on some tests with `arti` and various
specific queries, aimed at reducing the false positive rate.
Sorting the query elements so that generics always come first is
instead aimed at reducing the number of Map operations on mgens,
assuming if the bloom filter does find a false positive, it'll
be able to reject the row without having to track a mapping.
- https://hur.st/bloomfilter/?n=3&p=&m=96&k=6
Different functions have different amounts of inputs, and
unification isn't very slow anyway, so figuring out a single
ideal number of hash functions is nasty, but 6 keeps things
low even up to 10 inputs.
- https://web.archive.org/web/20210927123933/https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.72.2442&rep=rep1&type=pdf
This is the `h1` and `h2`, both derived from `h0`.1 parent 9a9695a commit 9dfcf13
1 file changed
+46
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2261 | 2261 | | |
2262 | 2262 | | |
2263 | 2263 | | |
| 2264 | + | |
| 2265 | + | |
| 2266 | + | |
| 2267 | + | |
| 2268 | + | |
| 2269 | + | |
| 2270 | + | |
| 2271 | + | |
| 2272 | + | |
| 2273 | + | |
| 2274 | + | |
| 2275 | + | |
| 2276 | + | |
| 2277 | + | |
| 2278 | + | |
| 2279 | + | |
2264 | 2280 | | |
2265 | 2281 | | |
2266 | 2282 | | |
| |||
2823 | 2839 | | |
2824 | 2840 | | |
2825 | 2841 | | |
2826 | | - | |
2827 | 2842 | | |
2828 | 2843 | | |
2829 | 2844 | | |
2830 | 2845 | | |
2831 | 2846 | | |
2832 | 2847 | | |
2833 | 2848 | | |
| 2849 | + | |
| 2850 | + | |
| 2851 | + | |
| 2852 | + | |
| 2853 | + | |
| 2854 | + | |
| 2855 | + | |
| 2856 | + | |
| 2857 | + | |
| 2858 | + | |
| 2859 | + | |
| 2860 | + | |
| 2861 | + | |
| 2862 | + | |
| 2863 | + | |
| 2864 | + | |
| 2865 | + | |
| 2866 | + | |
| 2867 | + | |
2834 | 2868 | | |
2835 | | - | |
2836 | | - | |
2837 | | - | |
2838 | | - | |
2839 | | - | |
2840 | | - | |
2841 | | - | |
2842 | | - | |
| 2869 | + | |
| 2870 | + | |
| 2871 | + | |
| 2872 | + | |
| 2873 | + | |
| 2874 | + | |
| 2875 | + | |
| 2876 | + | |
| 2877 | + | |
| 2878 | + | |
| 2879 | + | |
2843 | 2880 | | |
2844 | 2881 | | |
2845 | 2882 | | |
| |||
2868 | 2905 | | |
2869 | 2906 | | |
2870 | 2907 | | |
2871 | | - | |
2872 | 2908 | | |
2873 | 2909 | | |
2874 | 2910 | | |
| |||
0 commit comments