[Prev][Next][Index][Thread]

# Re: List operations (Was: More LPMOO stuff)

- Date: Tue, 15 Aug 1995 14:57:47 PDT
- From:
- cc: anomaly@u.washington.edu, moo-cows@parc.xerox.com
- Content-Type: TEXT/PLAIN; charset=US-ASCII
- In-Reply-To: <199508152007.NAA03099@crg8.sequent.com>

    On Tue, 15 Aug 1995, Ben Jackson wrote:

    > In message <9508150203.AA16751@hardy.u.washington.edu> , you wrote:
    > > Hence list[n..] would be equivalent to list[n..length(list)], except it
    > > should save the extra time of evaluating length(list).
    >
    > It would save you the extra time of *typing* length(list).  The length
    > will still have to be evaluated.  In either case it's O(1), since list[0]
    > contains the length (it's inaccessible from MOOcode).  I don't think you
    > can argue that this would be a performance improvement.

    Wouldn't it be an improvement since the actual call to the builtin length
    is not made?  Using the value in the list directly should be faster than
    running through the loop for the builtin call, pushing it on the stack
    and poping it back off...

    Acroyear		       and his sidekick		       Stephan Szabo
    Ex-King of Spartak					       Expired Bovine
    Member of the Micronauts				       Theologist

- Prev: Re: List operations
- Next: Re: List operations (Was: More LPMOO stuff)
- Index: MOO-cows
- Thread: MOO-cows

Home | Subject Index | Thread Index