[mercury-users] Mercury in academic teaching?

Jonathan Morgan jonmmorgan at gmail.com
Wed Oct 11 16:32:25 AEST 2006


On 11/10/06, Peter Schachte <schachte at csse.unimelb.edu.au> wrote:
> On Wed, Oct 11, 2006 at 12:46:45PM +1000, Jonathan Morgan wrote:
> > I'm quite
> > happy with the approach of Mercury, that (generally) optimisations
> > should be done by the compiler, not the user.
>
> Mercury does that at a low level, through it's optimized execution
> model and various standard and non-standard compiler optimizations.
> But, AFAIK (correct me if I'm wrong), these optimizations only improve
> the constant factors -- significantly, but still only constant
> factors.  The user must still optimize the code.  The compiler that
> takes in a high-level (inefficient) specification and turns out
> optimized executables is still a very long way off.  Maybe it always
> will be.

That was mostly what I was getting at (though I will accept some of
Ralph's optimisations are better than constant factor).  However, I'm
not expecting a compiler to do anything other than produce reasonable
code, given what I have given it.  If I write something bad, I expect
the compiler to produce something bad.  What I object to is the idea
that I should have to make many low-level and repetitive
optimisations, just to tell the compiler that I want efficiency - I
like these basic efficiencies built into the compiler.

The fact still remains that most students will not need to care
particularly about the speed of their code, because they are only
dealing with relatively small problems.

Jon
--------------------------------------------------------------------------
mercury-users mailing list
Post messages to:       mercury-users at csse.unimelb.edu.au
Administrative Queries: owner-mercury-users at csse.unimelb.edu.au
Subscriptions:          mercury-users-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the users mailing list