Branch/performance

@BrettASwift @kadst43 would you mind reviewing?
This seems like a pretty big change, and risky given its location.  Is it necessary?