Optimized StackContext implementation
Comparison fix
Use range instead of xrange
Don't use range for performance reasons
_handle_exception in testing.py ignores passed exception
Merge remote-tracking branch 'mrjoes/perf'