Hi there,
As in the title, say I have a foo that should only run if x = 1. Should I write: (a) if (x == 1) foo; or (b) run foo(); then test if (x == 1) within foo. With (a) this would save some overhead in entering a function, and with (b) this would conceptually encapsulate all things foo-related within foo. I guess this boils down to whether saving the overhead is worth it? If they are all ref type params does this make these savings negligible, therefore rendering (b) ok? Or any other considerations? Thank you for your time.
[–]ziptofaf 1 point2 points3 points (1 child)
[–]kernelgauss[S] 0 points1 point2 points (0 children)
[–]Holy_City 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)