They want to use a normalized URL as the hashkey to cache system.
Depending on exactly what type of hashing they are doing, the normalization could be a significant fraction of the lookup time.
If you are going to get all micro-optimized, you should probably combine the normalization and hash steps, as there is likely some string parsing / building that could be eliminated.
Depending on exactly what type of hashing they are doing, the normalization could be a significant fraction of the lookup time.
If you are going to get all micro-optimized, you should probably combine the normalization and hash steps, as there is likely some string parsing / building that could be eliminated.
Also: it's a pretty fun exercise.