Does anyone know of any discussion of documents that describe algorithms? And closely related are the relationships between the parent and child graphs to invoke the graph.
Background: I have a compiler written in Ocamlthat aggressively embeds functions, primarily as a result of this and some other optimizations, it generates faster code for my programming language than most others in many cases (including even C).
Problem # 1: The algorithm has recursion problems. For this, my rule is only to embed the children in the parents in order to prevent infinite recursion, but this eliminates the possibility of combining functions with each other.
Problem # 2: I don’t know a simple way to optimize nesting operations. My algorithm is necessary with a variable representation of function bodies, because it is not even possible to make an effective functional embedding algorithm possible. If the call graph is a tree, it is clear that the bottom inlay is optimal.
Technical Information: An attachment consists of several stages of an attachment. The problem is streamlining the steps.
Each step works as follows:
- we make a copy of the function, which should be built-in and beta-reduced by replacing type parameters and parameter parameters with arguments.
- Then we replace the return statement by assigning a new variable, followed by the transition to the end of the function body.
- The original function call is then replaced by this body.
- .
, - ,
.
. , , , , , -, , . - , , . , , , .
garbage collect . , . , , , , . , , , , , "" : , , .
ML , , , , , .
№ 3:, ?
: , ; Haskell. , Haskell . , , , ( beta-reduction).
, , , : , . , . , GHC : , .
. , , , , . , . , , .
, , , . , . , var.
, : Felix - . Haskell. , , - (- , , ).
, .
, , typeclass, , .
- , , .
" " : , , , , . , , .
, . . : , .
, , f g, f g g f, f g g f.. . , f g, , f g, .
, "" " ".