Timing the beast
----------------

This is what I've been doing for timings.  First, get a baseline with
pystones::

 $ /path/to/bin/python /path/to/lib/python2.4/test/pystone.py
 Pystone(1.1) time for 50000 passes = 1.11
 This machine benchmarks at 45045 pystones/second



Now, get the console script installed::

 $ /path/to/bin/python setup.py develop


Run it once with a boring URI::

 $ time /path/to/bin/uri_test docs/examples/nested.xml http://example.com/
 ------------------------------------------------------------------------------
 URI: http://example.com/
 ------------------------------------------------------------------------------
 simple = Simple
 ...
 real	0m0.207s
 user	0m0.121s
 sys	0m0.087s


Run it a hundred times with the same boring URI::

 $ time /path/to/bin/uri_test docs/examples/nested.xml \
   $(for (( i = 0; i < 100; ++i )); do echo http://example.com/; done)
 ...
 real	0m0.240s
 user	0m0.126s
 sys	0m0.084s


Run it once with an "interesting" URI::

 $ time /path/to/bin/uri_test docs/examples/nested.xml https://example.com/foo
 ------------------------------------------------------------------------------
 URI: https://example.com/foo
 ------------------------------------------------------------------------------
 another = Value
 simple = Re-overridden
 ...
 real	0m0.201s
 user	0m0.116s
 sys	0m0.079s


Run it a hundred times with the same URI::

 $ time /path/to/bin/uri_test docs/examples/nested.xml \
   $(for (( i = 0; i < 100; ++i )); do echo https://example.com/foo; done)
 ...
 real	0m0.243s
 user	0m0.139s
 sys	0m0.078s


Run it with 100 slightly different URIs::

 $ time /path/to/bin/uri_test docs/examples/nested.xml \
   $(for (( i = 0; i < 100; ++i )); do echo https://example.com/foo/$i; done)
 ...
 real	0m0.250s
 user	0m0.139s
 sys	0m0.083s


So, overall, it looks as though evaluating a URI against this model (including
cracking it, etc.) takes somewhere between 300 and 400 microseconds average
on my hardware.
