[mercury-users] partially instantiated data structures
Peter Schachte
schachte at cs.mu.OZ.AU
Mon Jul 19 09:18:18 AEST 1999
On Fri, Jul 16, 1999 at 02:52:39PM +1000, Fergus Henderson wrote:
> Peter Schachte <schachte at cs.mu.OZ.AU> wrote:
> > Fergus Henderson wrote:
> > > (In fact the Mercury solution in such cases is quite likely just as
> > > efficient as the Prolog solution, despite the copying, because of the
> > > efficiency advantages of Mercury's compile-time mode analysis.
> >
> > I don't think that's a very meaningful comparison. If you're saying
> > that "well, Prolog may be a bit faster here, but Mercury is so much
> > faster everywhere else that it wins overall," then I certainly agree,
>
> No, I meant that even for code using this technique, Mercury is quite
> likely just as fast, possibly faster. I was basically comparing the
> costs of copying with the costs of dynamic moding. There are other
> differences between Mercury and Prolog that affect efficiency, of course,
> such as the availability of static type and determinism information,
> but static modes are the most important one as far as efficiency is
> concerned.
Agreed.
> > but that doesn't mean Mercury couldn't use a variant of the Prolog
> > implementation strategy and do even better
> We do hope to eventually support statically moded partially instantiated
> data structures in Mercury. That would be significantly more efficient
> than either of these two approaches (the copying solution or the solution
> using dynamic moding).
That's what I meant. Execution-wise, it's not very far from
last-call-modulo-construction, though of course the analysis is much
harder. And the performance gain and convenience gain for the
programmer are more significant.
--
Peter Schachte One of the symptoms of an approaching
mailto:schachte at cs.mu.OZ.AU nervous breakdown is the belief that
http://www.cs.mu.oz.au/~schachte/ one's work is terribly important.
PGP: finger schachte at 128.250.37.3 -- Bertrand Russell
--------------------------------------------------------------------------
mercury-users mailing list
post: mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the users
mailing list