jacobian/djangobench — pull request #11 by lqc (2012-10-13 16:17:41+00:00)
Title: Added two resolver benchmarks

One is a long flat list of pattern, all at the same level. The other is and nested tree of disjunct patterns.

Together with url_resolve, they all show regression in resolver since 1.3:

Running benchmarks: url_resolve_nested url_resolve_flat url_resolve
Control: Django 1.3.3 (in git branch stable/1.3.x)
Experiment: Django 1.5.dev20121013150129 (in git branch master)

Running 'url_resolve' benchmark ...
Min: 0.000140 -> 0.000224: 1.5997x slower
Avg: 0.000150 -> 0.000236: 1.5799x slower
Significant (t=-343.028482)
Stddev: 0.00002 -> 0.00003: 1.1105x larger (N = 20000)

Running 'url_resolve_flat' benchmark ...
Min: 0.002211 -> 0.004952: 2.2397x slower
Avg: 0.002305 -> 0.005168: 2.2424x slower
Significant (t=-737.542955)
Stddev: 0.00029 -> 0.00047: 1.6063x larger (N = 20000)

Running 'url_resolve_nested' benchmark ...
Min: 0.000124 -> 0.000137: 1.1038x slower
Avg: 0.000133 -> 0.000146: 1.1006x slower
Significant (t=-5.115577)
Stddev: 0.00036 -> 0.00010: 3.5763x smaller (N = 20000)