LPS-39338 Optimize render weight comparator