Again, if you are worried about speed, just have two different methods that you select at write time.
It seems stupid to me to spend all this effort when as you type in the code you know if you are passing a parameter or not. And if you are not then select the method that takes one parameter and uses self. If so, then use the method that takes two parameters.
(And if you are really worried that some times the paramater that you pass might be NULL and you want to use the first method, then right a third one that choses between the two, which you only call in that very rare situation)
New basic rule, if you are worried about the speed of an If and IFing at write time is possible, then IF at write time. You are a lot better off with slightly larger code.
It seems stupid to me to spend all this effort when as you type in the code you know if you are passing a parameter or not. And if you are not then select the method that takes one parameter and uses self. If so, then use the method that takes two parameters.
(And if you are really worried that some times the paramater that you pass might be NULL and you want to use the first method, then right a third one that choses between the two, which you only call in that very rare situation)
New basic rule, if you are worried about the speed of an If and IFing at write time is possible, then IF at write time. You are a lot better off with slightly larger code.