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.
Byte 1 byte 1 byteCode: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)
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




Reply With Quote