various performance fixes
add perf command line test
Merge branch 'jcb/perf'
Remove some unnecessary debugging code
Merge pull request #1 from staticfloat/jcb/perf

Merge further performance improvements from @jakebolewski