add benchmarks/run script and make minor performance improvements