News for hackers. Stuff that matters.
Re:What I learned from my first C coding challenge by cyberroadie on Tuesday September 04, 2012 @05:08PM (#4476543)
I made a varnish urlsort module a while ago: https://github.com/cyberroadie/varnish-urlsort

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

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.