|Anonymous | Login | Signup for a new account||2017-10-23 13:27 CEST|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0005287||OCaml||~DO NOT USE (was: OCaml general)||public||2011-06-10 08:29||2013-02-25 19:43|
|Target Version||Fixed in Version||3.13.0+dev|
|Summary||0005287: optimization of partial applications|
|Description||Partial applications like (f x) where f has arity greater than 3 are expensive, since every application will lead to a closure allocation for each intermediary argument. Moreover, such functions are not inlined anymore.|
This patch fixes these two behaviors:
- in cmmgen.ml, caml_curry functions are modified so that they can be applied directly, when all the remaining arguments are provided. No allocation anymore for intermediate arguments.
- in closure.ml, partial applications are detected, and, when the true arity of the function is known, an eta-expansion is performed.
- since approximations of arguments are lost during applications, the optimization is less interesting than with the patch I sent by email, but its complexity is unchanged (the "planck" parser of Jun could trigger an exponential complexity due to the recursive call to "close")
- approximations are not known for external functions when they are bigger than the inlining threshold, so the transformation cannot be triggered for them, although it would be interesting.
|Tags||No tags attached.|
|Attached Files||optimize-partial-applications-3.12.0.patch [^] (4,921 bytes) 2011-06-10 08:29 [Show Content]|
Patch applied in SVN trunk. We'll see how it goes.
|2011-06-10 08:29||lefessan||New Issue|
|2011-06-10 08:29||lefessan||File Added: optimize-partial-applications-3.12.0.patch|
|2011-06-12 12:05||xleroy||Note Added: 0006005|
|2011-06-12 12:05||xleroy||Status||new => resolved|
|2011-06-12 12:05||xleroy||Resolution||open => fixed|
|2011-06-12 12:05||xleroy||Fixed in Version||=> 3.13.0+dev|
|2011-06-12 12:05||xleroy||Assigned To||=> xleroy|
|2012-09-25 20:06||xleroy||Status||resolved => closed|
|2013-02-25 19:43||xleroy||Relationship added||parent of 0005933|
|2017-02-23 16:36||doligez||Category||OCaml general => -OCaml general|
|2017-03-03 17:55||doligez||Category||-OCaml general => -(deprecated) general|
|2017-03-03 18:01||doligez||Category||-(deprecated) general => ~deprecated (was: OCaml general)|
|2017-03-06 17:04||doligez||Category||~deprecated (was: OCaml general) => ~DO NOT USE (was: OCaml general)|
|Copyright © 2000 - 2011 MantisBT Group|