Completed
Details
Assignee
UnassignedUnassignedReporter
Andy FingerhutAndy FingerhutLabels
Approval
OkPatch
Code and TestPriority
MajorFix versions
Details
Details
Assignee
Unassigned
UnassignedReporter
Andy Fingerhut
Andy FingerhutLabels
Approval
Ok
Patch
Code and Test
Priority

Fix versions
Created June 17, 2009 at 9:49 PM
Updated September 6, 2017 at 5:42 PM
Resolved September 6, 2017 at 5:42 PM
max-key or min-key will evaluate (k value) multiple times for arguments if more than 2 arguments are passed. This is undesirable if k is expensive to calculate.
Good perf test:
Approach: Avoid repeated evaluation of k for any element.
A criterium test of the example above shows:
Before: 206.017411 µs
After: 126.532306 µs
Patch: clj-99-v3.patch