Results 1 to 10 of 10

Thread: Remove Dups from array

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member Maven's Avatar
    Join Date
    Feb 2003
    Location
    Greeneville, TN
    Posts
    322

    Remove Dups from array

    It's another late night and I'm board so I've played with routines to get rid of duplicates in an array. Of course I did this in ASM =P

    I compared it to a visual basic algorithm done by plenderj. You can view it here: http://vbforums.com/showthread.php?t=157498

    My version is 162.5 times faster. (I predict a post from Merri telling me how unfair this is lol)

    I've included a source and the dll.

    Code:
    Example Functions:
    ~~~~~~~~~~~~
    
    'Any 1 Byte Variable:
    Private Declare Sub RemoveDuplicatesB Lib "arrfunctions.dll" (ByRef arr() As Byte)
    
    'Any 2 byte variable
    Private Declare Sub RemoveDuplicatesWD Lib "arrfunctions.dll" (ByRef arr() As Integer)
    
    'Any 4 byte variable
    Private Declare Sub RemoveDuplicatesDD Lib "arrfunctions.dll" (ByRef arr() As Long)
    
    'Any 8 byte variable
    Private Declare Sub RemoveDuplicatesQW Lib "arrfunctions.dll" (ByRef arr() As Double)
    Byte 1 byte 1 byte
    Integer 2 bytes 2 bytes
    Long 4 bytes 4 bytes
    Single 4 bytes 4 bytes
    Double 4 bytes 8 bytes
    Date 4 bytes 8 bytes
    Attached Files Attached Files
    Education is an admirable thing, but it is well to remember from time to time that nothing that is worth knowing can be taught. - Oscar Wilde

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width