in reply to Re^5: Hash Search is VERY slow
in thread Hash Search is VERY slow
I sort hash keys all the time. And IP sorting is easy when you include leading zeroes as you just did, but most IP's I see in log files are without leading zeroes, so ordering them would result in
1.2.3.4 10.2.3.4 104.2.3.4 11.2.3.4 2.2.3.4 23.2.108.4 23.2.3.4 23.2.30.4 23.2.4.4
and IMHO that sucks. Using packed keys sorting is always correct. If it is faster? No idea, Icould bench that, but I expect it to be marginal
Side note: I *always* sort hash keys in tests, as order is randow
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: Hash Search is VERY slow
by LanX (Saint) on Sep 30, 2021 at 14:30 UTC |