Clearly adding further constraints can only worsen performance. I would code according to best practices except for cases where it’s possible to infer them implying tight bottlenecks. Then profile the code and if circumventing best practices results in a meaningful performance increase, do that.