Learned Prioritization for Trading Off Accuracy and Speed