Better performing min/max