Small perf improvements