comp.lang.ada
 help / color / mirror / Atom feed
From: fjh@munta.cs.mu.OZ.AU (Fergus Henderson)
Subject: Re: Language Efficiency
Date: 1995/04/19
Date: 1995-04-19T00:00:00+00:00	[thread overview]
Message-ID: <9511001.20524@mulga.cs.mu.OZ.AU> (raw)
In-Reply-To: dewar.797310004@gnat

dewar@cs.nyu.edu (Robert Dewar) writes:

>Please substantiate the "heresy" that different languages make a big
>difference in generated code efficiency.

Sure.  There's a language called Prolog, which has been around
for a decade or two now.  Lots of effort has been put into optimizing it.
Hundreds of papers have been written.  Dozens of implementations have
been developed.

I and a couple of others have developed a new language called Mercury
over the last year or two.  Mercury is similar to a subset of
Prolog with additional declarations.

We've done quite a bit of benchmarking, and the Mercury compiler
produces code that is on average about 70% faster than the code
produced by the best optimizing Prolog compiler, Aquarius Prolog, for a
set of small benchmarks.  (For real-world code the difference is almost
certainly _larger_ than 70%, since the techniques used in the Mercury
compiler scale better to large programs than those used in Aquarius Prolog.)

This difference in efficiency is precisely because Mercury was deliberately
designed to make it much easier to generate efficient code.

Note that in it's most optimizing mode, Aquarius Prolog does not
support certain features of Prolog, because they prevent some optimizations.
If you invoke Aquarius Prolog in a mode which supports those features,
the generated code is about a factor of two slower.  So if you compare
Mercury to that, we're about 3.4 times faster.
(The feature in question is the ability to write `read(X), call(X)',
which can call any predicate with any arguments depending on the input.)

For more details, including detailed performance tables, see

	The execution algorithm of Mercury: an efficient purely
	declarative logic programming language.  Zoltan Somogyi, Fergus
	James Henderson and Thomas Charles Conway.

available from http://www.cs.mu.oz.au/~zs/mercury.html.

-- 
Fergus Henderson            | As practiced by computer science, the study of
fjh@cs.mu.oz.au             | programming is an unholy mixture of mathematics,
http://www.cs.mu.oz.au/~fjh | literary criticism, and folklore. - B. A. Sheil




  reply	other threads:[~1995-04-19  0:00 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-04-02  0:00 Language Efficiency Robert C. Bethel
1995-04-04  0:00 ` Bob Kitzberger
1995-04-05  0:00   ` Mike Wilson
1995-04-05  0:00     ` David Weller
1995-04-05  0:00     ` Larry Kilgallen
1995-04-04  0:00 ` Harold P Zbiegien
1995-04-04  0:00   ` Kennel
1995-04-05  0:00     ` Ray Toal
1995-04-07  0:00     ` Robert Dewar
1995-04-19  0:00       ` Fergus Henderson [this message]
1995-04-19  0:00         ` Robert Dewar
1995-04-20  0:00           ` Kennel
1995-04-19  0:00             ` Robert Dewar
     [not found]       ` <3m9o9q$igf@stc06.ctd.ornl.gov>
     [not found]         ` <D6ss6z.Gvw@mcshub.dcss.mcmaster.ca>
     [not found]           ` <dewar.797512974@gnat>
     [not found]             ` <3mbmd5$s06@icebox.mfltd.co.uk>
1995-04-19  0:00               ` Multiple dispatch (was Re: C++ not OOP?) Kenneth Almquist
     [not found]               ` <D6uA77.Lqp@mcshub.dcss.mcmaster.ca>
     [not found]                 ` <dewar.797566928@gnat>
     [not found]                   ` <D6vxDG.JKJ@mcshub.dcss.mcmaster.ca>
     [not found]                     ` <dewar.797636710@gnat>
     [not found]                       ` <D6xF22.38H@mcshub.dcss.mcmaster.ca>
     [not found]                         ` <dewar.797729041@gnat>
     [not found]                           ` <3msdop$862@stc06.ctd.ornl.gov>
1995-04-19  0:00                   ` Language Efficiency Paul Graham
1995-04-19  0:00                     ` Robert Dewar
     [not found]                 ` <3mcfbf$psl@acmez.gatech.edu>
     [not found]                   ` <3mgnkc$e3j@atlantis <3muaif$46u@atlantis.utmb.edu>
     [not found]                     ` <3n0lsu$nio@druid.borland.com>
     [not found]                       ` <3n0uvi$8jt@atlantis.utmb.edu>
1995-04-19  0:00                         ` C++ not OOP? (Was: " Fernando Mato Mira
1995-04-19  0:00                           ` Curtis Bass
1995-04-19  0:00                             ` David Weller
1995-04-20  0:00                               ` Curtis Bass
1995-04-20  0:00                                 ` David Weller
1995-04-20  0:00                                   ` Curtis Bass
1995-04-21  0:00                                     ` Fernando Mato Mira
1995-04-21  0:00                                     ` Robert Martin
1995-04-21  0:00                                       ` Ed Osinski
1995-04-20  0:00                                   ` Robert Dewar
1995-04-21  0:00                                     ` Curtis Bass
1995-04-21  0:00                                       ` Robert Dewar
1995-04-21  0:00                                 ` Robert Martin
1995-04-20  0:00                         ` Matt Austern
1995-04-21  0:00                         ` Matt Austern
1995-04-22  0:00                           ` Robert Martin
1995-04-22  0:00                             ` OOAD courses by Object Mentor cjames
1995-04-22  0:00                           ` C++ not OOP? (Was: Language Efficiency David Weller
1995-04-21  0:00                         ` Robert Martin
1995-04-21  0:00                           ` Curtis Bass
1995-04-21  0:00                         ` Ed Osinski
1995-04-21  0:00                         ` Robert Martin
1995-04-21  0:00                           ` Curtis Bass
     [not found]                   ` <3mcoh6$add@Starbase.NeoSoft.COM>
     [not found]                     ` <3mdrpf$3o9@disunms.epfl.ch>
     [not found]                       ` <dewar.797608300@gnat>
     [not found]                         ` <3mg45s$5r7@disunms.epfl.ch>
     [not found]                           ` <3mjc8c$630@crcnis3.unl.edu>
     [not found]                             ` <D71Gs9.2FG@nntpa.cb.att.com>
     [not found]                               ` <EACHUS.95Apr17162921@spectre.mitre.org>
     [not found]                                 ` <3n1als$ksi@no-names.nerdc.ufl.edu>
1995-04-19  0:00                                   ` Multiple dispatch (was Re: C++ not OOP?) Fernando Mato Mira
     [not found]                           ` <1995Apr13.152104@di.epfl.ch>
1995-04-21  0:00                             ` C++ not OOP? (Was: Language Efficiency James McKim
     [not found]                   ` <3mgnkc$e3j@atlantis.utmb.edu>
     [not found]                     ` <1995Apr13.180317.3308@rcmcon.com>
     [not found]                       ` <3muaif$46u@atlantis.utmb.edu>
1995-04-21  0:00                         ` Robert Martin
1995-04-21  0:00                           ` Curtis Bass
1995-04-21  0:00                             ` Robert Dewar
1995-04-22  0:00                             ` Robert Martin
     [not found]                     ` <3mk65q$1kti@watnews1.watson.ibm.com>
     [not found]                       ` <3muavq$46u@atlantis.utmb.edu>
1995-04-21  0:00                         ` Norman H. Cohen
1995-04-21  0:00                           ` Curtis Bass
1995-04-19  0:00               ` Harley Davis
1995-04-19  0:00               ` Multiple dispatch (was Re: C++ not OOP?) Robert I. Eachus
     [not found]               ` <MATT.95Apr17124932@physics10.berkeley.edu>
     [not found]                 ` <3mujnl$4u8@atlantis.utmb.edu>
1995-04-20  0:00                   ` C++ not OOP? (Was: Language Efficiency ron house
1995-04-21  0:00                   ` Robert Martin
1995-04-21  0:00                     ` Curtis Bass
1995-04-21  0:00               ` Norman H. Cohen
1995-04-21  0:00                 ` Fernando Mato Mira
1995-04-21  0:00                   ` Erik Naggum
1995-04-21  0:00               ` Multiple dispatch (was Re: C++ not OOP?) Robert I. Eachus
1995-04-19  0:00             ` Language Efficiency Adam Beneschan
1995-04-19  0:00               ` Robert Dewar
     [not found]         ` <dewar.797469506@gnat>
     [not found]           ` <1995Apr10.095958@di.epfl.ch>
     [not found]             ` <dewar.797513130@gnat>
     [not found]               ` <1995Apr10.165638@di.epfl.ch>
     [not found]                 ` <D6yGqv.4BG@nntpa.cb.att.com>
1995-04-21  0:00                   ` Fergus Henderson
1995-04-22  0:00                     ` Kenneth Almquist
1995-04-04  0:00   ` Larry Kilgallen
1995-04-06  0:00     ` Robert Dewar
1995-04-20  0:00   ` Matt Austern
1995-04-21  0:00   ` Robert I. Eachus
1995-04-05  0:00 ` Mitch Gart
1995-04-05  0:00 ` Lawrence Free/ A.F. Software Services
1995-04-06  0:00 ` Ken Leidner
1995-04-06  0:00   ` Larry Kilgallen
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox