Optimized code for HRL COM constraint checking