Re:What I learned from my first C coding challenge
by cageface on Wednesday September 05, 2012 @02:48AM
(#4478294)
Interesting. Do you have any benchmarks handy to show how much of a difference this makes? I'd wonder if the dynamic allocations necessary to build the tree might undercut the lookup advantages.
Here my blog post about it: http://cyberroadie.wordpress.com/2012/01/05/varnish-reorderi...
It parses the url and every token gets added to a binary tree which than gets traversed in order to get the parameters alphabetically
It's been used in production in several companies I worked for, so tried and tested :-)
Olivier