we could use this in much more places if performance and memory benchmarking shows it's an improvement.