🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: cu.slug
Article #468

REMOVE-DUPLICATES losing

#468
From: Scott McKay
Date: Wed, 17 Jul 1996 00:00
24 lines
1568 bytes
    From: Daniel Finster <DF@sdf.lonestar.org>
    Date: Wed, 17 Jul 96 03:00 CDT
    
        From: Scott McKay <swm@harlequin.com>
        Date: Tue, 16 Jul 96 13:03:20 EDT
    
        'string=' is a pretty slow function.  How long are the strings, and
        where do the differences start to show up?
    
    The strings are all < 24 characters long, with differences usually in
    the first dozen characters.
    
        Still, 932 seconds seems like an awfully long time.  I notice that the
        GC flipped, too.  Who is consing?
    
    REMOVE-DUPLICATES -- The only thing I was doing while waiting for it
    to finish was running Terminal.  I can try it again with GC off if you like.
I think the suggestion that you avoid inserting duplicates in the
first place might be the better one.  Of course, this is O(n^2) as
well, but the size of the collection will stay smaller.

BTW, is the collection a list or a vector?  This will make a big
difference, too.
Technical Details
Message-ID: <837617125.25989@news.Colorado.EDU>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <1006.9607161703@bakura.harlequin.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10077e,2565d3289f508703
X-Google-Attributes: gid10077e,public
From: Scott McKay <swm@harlequin.com>
Subject: REMOVE-DUPLICATES losing
Date: 1996/07/17
Message-ID: <837617125.25989@news.Colorado.EDU>
X-Deja-AN: 168620835
distribution: cu
sender: daemon@lace.colorado.edu
references: <1006.9607161703@bakura.harlequin.com>
x-note1: message-id generated by recnews
x-note2: mail msgid was   <9669.9607171447@bakura.harlequin.com>
organization: University of Colorado at Boulder
newsgroups: cu.slug