more perf tweaks, closes #3