Performance optimizations

Performance optimizations from https://github.com/knockout/knockout/issues/1154