Details
-
Type:
Enhancement
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Completed
-
Affects Version/s: None
-
Fix Version/s: Release 1.5
-
Component/s: None
-
Labels:
-
Patch:Code
-
Approval:Ok
Description
The attached patch copies metadata given to the method name symbol of memfn to the method receiver in the expansion. That way, memfn is able to be used even for type-hinted calls resulting in a big performance win.
user> (time (dotimes [i 1000000] ((memfn intValue) 1))) Reflection warning, NO_SOURCE_FILE:1 - call to intValue can't be resolved. "Elapsed time: 2579.229115 msecs" nil user> (time (dotimes [i 1000000] ((memfn ^Number intValue) 1))) "Elapsed time: 12.015235 msecs" nil
Applies properly against d4170e65d001c8c2976f1bd7159484056b9a9d6d. Things look good to me.