3 ms·
I would be surprised if it was dramatically slower, all told. Though, fair that I have not benchmarked in a long time, here. My main "idea" here is to stop f
by taeric 2y ago
I would be surprised if it was dramatically slower, all told. Though, fair that I have not benchmarked in a long time, here.
My main "idea" here is to stop from having to check all of the headers on a "per header" basis. Yes, you can make each check faster, as the TRIE does. You can also remove the entire reason to check individual headers by starting a traversal after where the internal headers are.
You could also go with something like making sure the first header is "InternalHeaderCount: N" where you then keep the internal headers segregated form the others by a simple count. (This assumes you have solid control over what is adding the headers internally, of course.)
(I also forgot to give kudos on the blog title. Any Die Hard reference is a good reference. :D )