5x performance increase on commonPrefix