How to manage compare policies if uvm_comparer should be avoided?

My current base class scoreboard checks the individual fields when comparing two items because sometimes I need to apply bit masking or value margin. It works, but I have to do factory override or modify the base class if a new comparison rule is required. I was think of refactoring my scoreboard so it would simple run observed.compare(expected, cfg.compare_policy). Where cfg.compare_policy could be null (for default comparison) or be an object with the rule for bit-masking, value margin, etc.

It seemed like an elegant solution until I check with the UVM Cookbook stating to “Avoid uvm_comparer policy class” on page 495. Page 498 mentions that it add overhead, but it is in the context of the field macros (which itself should be avoided for overhead reason). All the compare examples in the cookbook show strict comparison. What is the recommendation to conditionally apply bit masking, value margin, etc. when comparing two items?