Improve performance of partial

Description

This patch improves performance of partial by only using apply when needed. The code structure follows that of juxt.

Performance benchmark:

Results for 1.6.0:

Results for 1.7.0 with this patch:

Benchmarks performed via lein uberjar + running via the commandline.

Patch: partial-perf.diff

Screened by: Alex Miller

Environment

None

Attachments

1

Activity

AlexBaranosky 
September 6, 2014 at 3:11 AM

Very nice patch. I've gotten into the habit of not using partial anymore for performance sensitive code. Perhaps this change means I need to rethink that.

Alex Miller 
June 2, 2014 at 5:19 PM

Tim (and anyone really) - please let someone know if you need to change a screened patch! Looks fine here, but screener should be notified so they can re-screen.

Timothy Baldridge 
June 2, 2014 at 5:05 PM

nice catch! it was a typeo in my .gitconfig defaults. I've fixed the patch.

Timothy Baldridge 
June 2, 2014 at 5:04 PM

fixed email

Andy Fingerhut 
June 2, 2014 at 4:50 PM

Timothy, just a nit that I would not have noticed except for my program that checks for name and email address of patch authors, to see if they are on my contributor's list, but do you really have both of the email addresses tbaldridge@gmail.com and tbaldidge@gmail.com (note the spelling difference)? The latter is the one on this patch.

Completed

Details

Assignee

Reporter

Approval

Patch

Priority

Fix versions

Created May 23, 2014 at 4:05 PM
Updated September 6, 2014 at 3:11 AM
Resolved September 6, 2014 at 3:11 AM