![](/s/cache/d6/0b/d60bde44204fea218f6fee85b1aec774.png)
0
Completed
Great, but it will make code execution slow.
An "else" eliminates evaluation of nested if conditions. So factoring this way will make code slow
![](/s/cache/a6/73/a6734f0835e96bbe2628c5222c7eeee6.png)
0
Under review
Alexander 9 years ago
Which refactoring do you refer to?
![](/s/cache/d6/0b/d60bde44204fea218f6fee85b1aec774.png)
0
Madan kumar nath 9 years ago
I was referring to "Replace Nested Conditional with Guard Clauses".
![](/s/cache/a6/73/a6734f0835e96bbe2628c5222c7eeee6.png)
0
Alexander 9 years ago
Nope, it won't be slower if you return the values right from these if-s instead of waiting for the final return.
![](/s/cache/a6/73/a6734f0835e96bbe2628c5222c7eeee6.png)
0
Answer
Completed
Alexander 5 years ago
Customer support service by UserEcho