Re: math expressions optimalization

"Walter Misar" <>
14 Jun 2002 15:12:47 -0400

          From comp.compilers

Related articles
math expressions optimalization (Trix) (2002-06-13)
Re: math expressions optimalization (Sid Ahmed Ali TOUATI) (2002-06-14)
Re: math expressions optimalization (Walter Misar) (2002-06-14)
Re: math expressions optimalization (Allyn Dimock) (2002-06-14)
Re: math expressions optimalization (Tomasz Kowaltowski) (2002-06-17)
| List of all articles for this month |

From: "Walter Misar" <>
Newsgroups: comp.compilers
Date: 14 Jun 2002 15:12:47 -0400
Organization: Technische Universitaet Darmstadt
References: 02-06-032
Keywords: code, optimize
Posted-Date: 14 Jun 2002 15:12:45 EDT

Trix <> wrote:

> I`m going to implement simple alghoritm to optimalize math
> expressions in terms of use of memory cells.

> To do this step i just convert my expression to Polish Notation.

> So we`ve used only 2 memory cells - not 5 like above. I`ve written
> program which do this but I`m not sure my program works well - I`d
> like to compare to another solution.

> I don`t know the name of such alghoritm in English and can find it
> on the net.

That sounds like "Sethi Ullman numbering" [1]. It basically works
by evaluating the subexpression which is going to need the most cells
(registers) first.

[1] "The Generation of Optimal Code for Arithmetic Expressions"
        by R. Sethi and J.Ullmann in "Journal of the ACM 17(4), 1970"

Walter Misar

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.