3 ms·
If you're optimizing code while you're refactoring then you're not really refactoring. Refactoring shouldn't change what's happening.
by onion2k 8y ago
If you're optimizing code while you're refactoring then you're not really refactoring. Refactoring shouldn't change what's happening.
- hvidgaard 8y agoIf you want the exact same behavior, then you cannot refactor. Of course refactoring can and will affect performance. Refactoring should maintain identical functionality not counting performance unless it's a requirement.
- hvis 7y agoRefactoring means retaining the exact behavior, by definition. Of course, many refactorings will make it easier to apply performance optimizations later.
- hvidgaard 7y agoThat makes no sense. If you must retain exact behavior, you must compile to the same assembly instructions. Generally refactoring worries only about the functionality that you test in unit tests and integration tests, not counting performance.