slovodefinícia
loop combination
(foldoc)
loop combination
loop fusion

A program transformation where the bodies of two loops are
merged into one thus reducing the overhead of manipulating and
testing the control variable and branching. Further
optimisation of the merged code may then become possible.

In horizontal loop combination the bodies of the loops are
largely independent so only the loop overhead is saved.
Vertical loop combination applies where the results of the
first loop are used by the second. Combining the two allows
the intermediate results to be used immediately (in
registers) rather than requiring them to be stored in an
array.

The functional equivalent of horizontal and vertical loop
combination are tupling and fusion.
podobné slovodefinícia
horizontal loop combination
(foldoc)
tupling
horizontal loop combination

A program transformation where several results are returned
from a single traversal of a data structure. E.g.

mean l = sum l / length l

==>

mean l = s/n
where
(s,n) = sumLen l

sumLen [] = (0,0)
sumLen (x:xs) = (s+x, n+1)
where
(s,n) = sumLen xs

In procedural languages this technique is known as
horizontal loop combination because it uses one loop to
calculate several results.

Another form of tupling transformation is used to avoid
repeated evaluation where a function generates several
identical calls to itself. By analysing the pattern of
recursion (see descent function) it is possible to arrange
for these identical calls to share results. E.g.

fib 0 = 1
fib 1 = 1
fib n = fib (n-1) + fib (n-2)

==>

fib n = v where (_,v) = fibt n
fibt 0 = (1,1)
fibt n = (u+v,u) where (u,v) = fibt (n-1)

(1995-01-12)
vertical loop combination
(foldoc)
fusion
vertical loop combination

A program transformation where a composition
of two functions is replaced by in-lining them and combining
their bodies. E.g.

f x = g (h x) ==> f x = g (2 * x)
g x = x + 1 f x = 2 * x + 1
h x = 2 * x

This has the beneficial effect of reducing the number of
function calls. It can be especially useful where the
intermediate result is a large data structure which can be
eliminated.

See also vertical loop combination.

(1994-12-05)

Nenašli ste slovo čo ste hľadali ? Doplňte ho do slovníka.

na vytvorenie tejto webstránky bol pužitý dictd server s dátami z sk-spell.sk.cx a z iných voľne dostupných dictd databáz. Ak máte klienta na dictd protokol (napríklad kdict), použite zdroj slovnik.iz.sk a port 2628.

online slovník, sk-spell - slovníkové dáta, IZ Bratislava, Malé Karpaty - turistika, Michal Páleník, správy, údaje o okresoch V4