[m-dev.] for review: change MercuryFile structure
Peter Ross
peter.ross at miscrit.be
Tue Aug 8 20:41:51 AEST 2000
On Tue, Aug 08, 2000 at 03:31:12PM +1000, Fergus Henderson wrote:
> On 28-Jul-2000, Peter Ross <peter.ross at miscrit.be> wrote:
> > For Fergus to review.
> >
> > I will do the changes required to io.m to handle bidirectional streams
> > as a seperate change, as they are independent of this change.
> >
> > ===================================================================
> >
> > Estimated hours taken: 20
> >
> > Change the MercuryFile structure so that it now contains pointers to
> > functions which operate on the MercuryFile. This allows us, for
> > example, to create a MercuryFile structure which operates on sockets and
> > use the predicates in io.m to operate on the socket stream.
>
> OK, so this change is another version of the one previously
> discussed in the thread "Add Mission Critical extensions".
> Unlike the previous version, in this version the changes
> are applied unconditionally, rather than being #ifdef'd.
>
> The main drawback of that is the possible performance
> implications. What's the performance impact of this change?
> For example, how much does this change slow down `cat'
> programs written using io__read_char or io__read_line_as_string?
> I don't think we should commit this change until we have
> measured the performance impact. If the performance impact
> is too high, then we should go with the conditional compilation
> approach.
>
I ran the following command under WinNT a number of times and took the
best time. INPUT was about 1Mb in size.
cat < INPUT > OUTPUT
Original version:
real 0m0.062s
user 0m0.015s
sys 0m0.031s
New Version:
real 0m0.171s
user 0m0.140s
sys 0m0.061s
Will we get similar slow downs for a typeclass based approach, or will
type class specialisation remove most of the overhead?
Pete
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list