You should think about correctness before thinking about performance. What do you want the functions to do? I guess you don't want the first version of the functions because that would be a useless function. There is probably no different in speed between the pointer and reference versions. I would have picked the reference version because I think it's nicer and a reference can't be null.