Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › [Benchmark] .NET4 vs Hand-made collections
New Posts  All Forums:Forum Nav:

[Benchmark] .NET4 vs Hand-made collections - Page 3

post #21 of 31
Quote:
Originally Posted by killnine View Post
Couple of comments (Im no expert C#, but program in it professionally):

1) Why are you using datetime as your counter? Why not a true high speed counter like the System.Diagnostics.StopWatch class?

2) WHere is the implementation of your new data type? It might help to understand where this performance is coming from.

3) I think native data types can be made to work fine if you know the performance associated with them. Just like you wouldn't indiscriminantly use a long where you could use an int, using a dictionary where you might be able to create a more applicable hashtable might be the way to go.

I dont think there is a single object you can point to that is optimal for every situation, you have to know about the problem at hand and choose the right solution? Do you need fast insertion? fast retrieval? etc. Just look at List<T>

I am very skeptical of some of these results. I have a hard time believing that there is a routine that can find a value out of a 1M list with 0 response time (that doesn't have a huge drawback somewhere else)

4) Making graphs in excel. Please use titles, axes, units. Its a huge PITA to filter through a mess of charts that don't have any of that.
Also, your section providing some weird analog to complexity--simply provide theoretical complexity versus actual.
For sale
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7-920 Asus P6T Deluxe Asus GTX460 TOP 768mb G Skill ECO 1600 CAS7 1.35V 
Hard DriveOptical DriveOSMonitor
2x Vertex 60 GB raid[0] Asus DVDRW W7,Ubuntu 2 xAsus VH236H 
KeyboardPowerCaseMouse Pad
Razer Ultra X3 1000W HAF 932 My Desk 
  hide details  
Reply
For sale
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7-920 Asus P6T Deluxe Asus GTX460 TOP 768mb G Skill ECO 1600 CAS7 1.35V 
Hard DriveOptical DriveOSMonitor
2x Vertex 60 GB raid[0] Asus DVDRW W7,Ubuntu 2 xAsus VH236H 
KeyboardPowerCaseMouse Pad
Razer Ultra X3 1000W HAF 932 My Desk 
  hide details  
Reply
post #22 of 31
OK, I wasn't sure where to begin discussing the problems here (just noticed this thread) but it looks like somebody at least addressed one.

Using DateTime to time things is totally useless. DateTime gets the tick count but only updates in 10 ms increments so 9.9 ms is listed as 0 while 10 is listed as 10. There is almost no difference in time for those two so that is horribly inaccurate.

The upgrade to StopWatch fixed that but that didn't fix everything. Consider this, would you determine how many MPG your car gets by driving 1 mile at 50 mph? Do you think that is a legitimate and scientifically accurate approach? No. All you learned is what the gas mileage was for that specific car at that specific time going that specific distance at that specific speed. What happens if there is a headwind? What if you drive faster? Slower? Following close behind another vehicle so there is less air resistance?

Long story short, one test is irrelevant. There may be 10M items in a list but its only tested 1 time. Tests like this are useless unless that 10M item list is tested something like 10M times. Locating an object? Please, you need to locate multiple objects multiple times each.

Also, what the heck is up with this?

Code:
strSortedDict.Keys.ToList().BinarySearch((0.9*n).ToString());
This isn't even testing SortedDictionary anymore. You have a SortedDictionary which you then get the KeyCollection from then for some unknown reason a LINQ extension is called to convert the KeyCollection to a List and then BinarySearch is called. So at this point you are testing the BinarySearch functionality of a List. This isn't done just once. Lots of functionality is messed up. Like running a foreach loop to find a value in a LinkedList instead of using Find().

Here is how you find out if a SortedDictionary has that key...

Code:
strSortedDict.ContainsKey((0.9*n).ToString());
And if you want the value associated...

Code:
var value = strSortedDict[(0.9*n).ToString()]
Besides, List<T>.BinarySearch() does just what it says. A binary search. Anything that on average is faster than O(log n) will normally out gun it.
My giant
(13 items)
 
  
CPUMotherboardGraphicsRAM
E6600 lapped Asus P5n32-E 680i GeForce 9800GT 512MB 2x1GB (unused ATM) & 2x2Gb Corsair XMS2 PC6400 
Hard DriveOSMonitorPower
WDJS SATA-II 160GB + WD80GB + WDAAKS Raid0 320GB Aperature FSII 19" LCD Apevia DarkSide 600W 
Case
NZXT Zero 
  hide details  
Reply
My giant
(13 items)
 
  
CPUMotherboardGraphicsRAM
E6600 lapped Asus P5n32-E 680i GeForce 9800GT 512MB 2x1GB (unused ATM) & 2x2Gb Corsair XMS2 PC6400 
Hard DriveOSMonitorPower
WDJS SATA-II 160GB + WD80GB + WDAAKS Raid0 320GB Aperature FSII 19" LCD Apevia DarkSide 600W 
Case
NZXT Zero 
  hide details  
Reply
post #23 of 31
Thread Starter 
Quote:
Originally Posted by Kirmie View Post
OK, I wasn't sure where to begin discussing the problems here (just noticed this thread) but it looks like somebody at least addressed one.

Using DateTime to time things is totally useless. DateTime gets the tick count but only updates in 10 ms increments so 9.9 ms is listed as 0 while 10 is listed as 10. There is almost no difference in time for those two so that is horribly inaccurate.

The upgrade to StopWatch fixed that but that didn't fix everything. Consider this, would you determine how many MPG your car gets by driving 1 mile at 50 mph? Do you think that is a legitimate and scientifically accurate approach? No. All you learned is what the gas mileage was for that specific car at that specific time going that specific distance at that specific speed. What happens if there is a headwind? What if you drive faster? Slower? Following close behind another vehicle so there is less air resistance?

Long story short, one test is irrelevant. There may be 10M items in a list but its only tested 1 time. Tests like this are useless unless that 10M item list is tested something like 10M times. Locating an object? Please, you need to locate multiple objects multiple times each.

Also, what the heck is up with this?

Code:
strSortedDict.Keys.ToList().BinarySearch((0.9*n).ToString());
This isn't even testing SortedDictionary anymore. You have a SortedDictionary which you then get the KeyCollection from then for some unknown reason a LINQ extension is called to convert the KeyCollection to a List and then BinarySearch is called. So at this point you are testing the BinarySearch functionality of a List. This isn't done just once. Lots of functionality is messed up. Like running a foreach loop to find a value in a LinkedList instead of using Find().

Here is how you find out if a SortedDictionary has that key...

Code:
strSortedDict.ContainsKey((0.9*n).ToString());
And if you want the value associated...

Code:
var value = strSortedDict[(0.9*n).ToString()]
Besides, List<T>.BinarySearch() does just what it says. A binary search. Anything that on average is faster than O(log n) will normally out gun it.
There aren't many things faster than O(log n). None, to be specific. Never seen an algorithm performing faster than BinarySearch.
I re-did the tests with almost all of the above points corrected and the results are similar, I'm just overloaded with work right now, so I don't have time for this. I hope soon I'll be able to post the new results. Cheers.
My Rig
(14 items)
 
Ex-wife's Rig
(15 items)
 
 
CPUMotherboardGraphicsRAM
Core i5 4460 AsRock H81M-DG4 Sapphire Rx470 Platinum KVR 1600 16Gb 
Hard DriveHard DriveCoolingOS
2x Seagate 3Tb Samsung 850 EVO 120 Scythe Ninja 3 Rev.B Windows 10 Pro 
MonitorKeyboardPowerCase
Fujitsu Siemens A17-2A Logitech K280e SuperFlower SF-550K12XP Thermaltake Versa H25 
MouseAudio
Logitech G402 Sony MDR XD150 
CPUMotherboardGraphicsRAM
Athlon 750K 4.0Ghz AsRock FM2A75 Pro4+ Sapphire R9 270X Dual-X Kingston 2x4Gb 1600 
Hard DriveHard DriveOptical DriveCooling
Samsung 850 EVO 120  Western Digital 320Gb LiteON DVD-RW CoolerMaster Hyper Z600 
OSMonitorKeyboardPower
Windows 7 Pro x64 Toshiba 32" FullHD TV Logitech FSP Hexa 550 
CaseMouse
DeLUX Logitech 
  hide details  
Reply
My Rig
(14 items)
 
Ex-wife's Rig
(15 items)
 
 
CPUMotherboardGraphicsRAM
Core i5 4460 AsRock H81M-DG4 Sapphire Rx470 Platinum KVR 1600 16Gb 
Hard DriveHard DriveCoolingOS
2x Seagate 3Tb Samsung 850 EVO 120 Scythe Ninja 3 Rev.B Windows 10 Pro 
MonitorKeyboardPowerCase
Fujitsu Siemens A17-2A Logitech K280e SuperFlower SF-550K12XP Thermaltake Versa H25 
MouseAudio
Logitech G402 Sony MDR XD150 
CPUMotherboardGraphicsRAM
Athlon 750K 4.0Ghz AsRock FM2A75 Pro4+ Sapphire R9 270X Dual-X Kingston 2x4Gb 1600 
Hard DriveHard DriveOptical DriveCooling
Samsung 850 EVO 120  Western Digital 320Gb LiteON DVD-RW CoolerMaster Hyper Z600 
OSMonitorKeyboardPower
Windows 7 Pro x64 Toshiba 32" FullHD TV Logitech FSP Hexa 550 
CaseMouse
DeLUX Logitech 
  hide details  
Reply
post #24 of 31
Quote:
Originally Posted by ronnin426850 View Post
There aren't many things faster than O(log n). None, to be specific. Never seen an algorithm performing faster than BinarySearch.
I re-did the tests with almost all of the above points corrected and the results are similar, I'm just overloaded with work right now, so I don't have time for this. I hope soon I'll be able to post the new results. Cheers.
Hash tables/hash maps often have O(1) access:
http://en.wikipedia.org/wiki/Hash_table

STL Vectors and arrays have O(1) access if you know the index.

I also noticed (earlier in the thread) you're comparing a sorted list to an unsorted list's access times, I'm curious as to why? Those are two different container types. One pays for performance during the sort, the other pays for it during access.
Edited by lordikon - 4/11/11 at 12:41pm
Foldatron
(17 items)
 
Mat
(10 items)
 
Work iMac
(9 items)
 
CPUMotherboardGraphicsGraphics
i7 950 EVGA x58 3-way SLI EVGA GTX 660ti GTX 275 
RAMHard DriveHard DriveHard Drive
3x2GB Corsair Dominator DDR3-1600 80GB Intel X25-M SSD 2TB WD Black 150GB WD Raptor 
Hard DriveOSMonitorKeyboard
2x 150GB WD V-raptor in RAID0 Win7 Home 64-bit OEM 55" LED 120hz 1080p Vizio MS Natural Ergonomic Keyboard 4000 
PowerCase
750W PC P&C Silencer CoolerMaster 690 
CPUGraphicsRAMHard Drive
Intel Core i5 2500S AMD 6770M 8GB (2x4GB) at 1333Mhz 1TB, 7200 rpm 
Optical DriveOSMonitorKeyboard
LG 8X Dual-Layer "SuperDrive" OS X Lion 27" iMac screen Mac wireless keyboard 
Mouse
Mac wireless mouse 
CPUGraphicsRAMHard Drive
i7-2600K AMD 6970M 1GB 16GB PC3-10600 DDR3 1TB 7200rpm 
Hard DriveOptical DriveOSMonitor
256GB SSD 8x DL "SuperDrive" OS X 10.7 Lion 27" 2560x1440 iMac display 
Monitor
27" Apple thunderbolt display 
  hide details  
Reply
Foldatron
(17 items)
 
Mat
(10 items)
 
Work iMac
(9 items)
 
CPUMotherboardGraphicsGraphics
i7 950 EVGA x58 3-way SLI EVGA GTX 660ti GTX 275 
RAMHard DriveHard DriveHard Drive
3x2GB Corsair Dominator DDR3-1600 80GB Intel X25-M SSD 2TB WD Black 150GB WD Raptor 
Hard DriveOSMonitorKeyboard
2x 150GB WD V-raptor in RAID0 Win7 Home 64-bit OEM 55" LED 120hz 1080p Vizio MS Natural Ergonomic Keyboard 4000 
PowerCase
750W PC P&C Silencer CoolerMaster 690 
CPUGraphicsRAMHard Drive
Intel Core i5 2500S AMD 6770M 8GB (2x4GB) at 1333Mhz 1TB, 7200 rpm 
Optical DriveOSMonitorKeyboard
LG 8X Dual-Layer "SuperDrive" OS X Lion 27" iMac screen Mac wireless keyboard 
Mouse
Mac wireless mouse 
CPUGraphicsRAMHard Drive
i7-2600K AMD 6970M 1GB 16GB PC3-10600 DDR3 1TB 7200rpm 
Hard DriveOptical DriveOSMonitor
256GB SSD 8x DL "SuperDrive" OS X 10.7 Lion 27" 2560x1440 iMac display 
Monitor
27" Apple thunderbolt display 
  hide details  
Reply
post #25 of 31
Thread Starter 
So far I noted the following requirements to the test:

1. use StopWatch instead of TimeSpan
2. use FindIndex(s => s == "somestr") instead of foreach{}
3. test with reverse insert order too
4. track memory use
5. Don't use BinarySearch on SortedDict (HOW TO FIND INDEX??)

If there are any more, give them now, I'll be redoing the tests these days THanks.

Quote:
Originally Posted by lordikon View Post
Hash tables/hash maps often have O(1) access:
http://en.wikipedia.org/wiki/Hash_table

STL Vectors and arrays have O(1) access if you know the index.

I also noticed (earlier in the thread) you're comparing a sorted list to an unsorted list's access times, I'm curious as to why? Those are two different container types. One pays for performance during the sort, the other pays for it during access.
For many entries, HashTable is an alwful, alwful collection. It almost never has O(1) access, and worst case is as low as O(n) + overhead (heavy).
Where BinarySearch is guaranteed O(logn), which is very fast for large collections.
The comparison between sorted and unsorted is useful when the sorted collection manages to stay faster in both insertion and retieval.
My Rig
(14 items)
 
Ex-wife's Rig
(15 items)
 
 
CPUMotherboardGraphicsRAM
Core i5 4460 AsRock H81M-DG4 Sapphire Rx470 Platinum KVR 1600 16Gb 
Hard DriveHard DriveCoolingOS
2x Seagate 3Tb Samsung 850 EVO 120 Scythe Ninja 3 Rev.B Windows 10 Pro 
MonitorKeyboardPowerCase
Fujitsu Siemens A17-2A Logitech K280e SuperFlower SF-550K12XP Thermaltake Versa H25 
MouseAudio
Logitech G402 Sony MDR XD150 
CPUMotherboardGraphicsRAM
Athlon 750K 4.0Ghz AsRock FM2A75 Pro4+ Sapphire R9 270X Dual-X Kingston 2x4Gb 1600 
Hard DriveHard DriveOptical DriveCooling
Samsung 850 EVO 120  Western Digital 320Gb LiteON DVD-RW CoolerMaster Hyper Z600 
OSMonitorKeyboardPower
Windows 7 Pro x64 Toshiba 32" FullHD TV Logitech FSP Hexa 550 
CaseMouse
DeLUX Logitech 
  hide details  
Reply
My Rig
(14 items)
 
Ex-wife's Rig
(15 items)
 
 
CPUMotherboardGraphicsRAM
Core i5 4460 AsRock H81M-DG4 Sapphire Rx470 Platinum KVR 1600 16Gb 
Hard DriveHard DriveCoolingOS
2x Seagate 3Tb Samsung 850 EVO 120 Scythe Ninja 3 Rev.B Windows 10 Pro 
MonitorKeyboardPowerCase
Fujitsu Siemens A17-2A Logitech K280e SuperFlower SF-550K12XP Thermaltake Versa H25 
MouseAudio
Logitech G402 Sony MDR XD150 
CPUMotherboardGraphicsRAM
Athlon 750K 4.0Ghz AsRock FM2A75 Pro4+ Sapphire R9 270X Dual-X Kingston 2x4Gb 1600 
Hard DriveHard DriveOptical DriveCooling
Samsung 850 EVO 120  Western Digital 320Gb LiteON DVD-RW CoolerMaster Hyper Z600 
OSMonitorKeyboardPower
Windows 7 Pro x64 Toshiba 32" FullHD TV Logitech FSP Hexa 550 
CaseMouse
DeLUX Logitech 
  hide details  
Reply
post #26 of 31
Quote:
Originally Posted by ronnin426850 View Post
So far I noted the following requirements to the test:

1. use StopWatch instead of TimeSpan
2. use FindIndex(s => s == "somestr") instead of foreach{}
3. test with reverse insert order too
4. track memory use
5. Don't use BinarySearch on SortedDict (HOW TO FIND INDEX??)

If there are any more, give them now, I'll be redoing the tests these days THanks.



For many entries, HashTable is an alwful, alwful collection. It almost never has O(1) access, and worst case is as low as O(n) + overhead (heavy).
Where BinarySearch is guaranteed O(logn), which is very fast for large collections.
The comparison between sorted and unsorted is useful when the sorted collection manages to stay faster in both insertion and retieval.
Can I get a source on this? These are bold claims where you're saying that basically Microsoft's algorithm programmers are incompetent. Additionally, most of these algorithms are based on STL containers that have been proven over decades.

I routinely use ext hash map and multimap for sizes ranging in the tens of thousands, accessing it thousands of times per frame, running 30 frames per second.
Foldatron
(17 items)
 
Mat
(10 items)
 
Work iMac
(9 items)
 
CPUMotherboardGraphicsGraphics
i7 950 EVGA x58 3-way SLI EVGA GTX 660ti GTX 275 
RAMHard DriveHard DriveHard Drive
3x2GB Corsair Dominator DDR3-1600 80GB Intel X25-M SSD 2TB WD Black 150GB WD Raptor 
Hard DriveOSMonitorKeyboard
2x 150GB WD V-raptor in RAID0 Win7 Home 64-bit OEM 55" LED 120hz 1080p Vizio MS Natural Ergonomic Keyboard 4000 
PowerCase
750W PC P&C Silencer CoolerMaster 690 
CPUGraphicsRAMHard Drive
Intel Core i5 2500S AMD 6770M 8GB (2x4GB) at 1333Mhz 1TB, 7200 rpm 
Optical DriveOSMonitorKeyboard
LG 8X Dual-Layer "SuperDrive" OS X Lion 27" iMac screen Mac wireless keyboard 
Mouse
Mac wireless mouse 
CPUGraphicsRAMHard Drive
i7-2600K AMD 6970M 1GB 16GB PC3-10600 DDR3 1TB 7200rpm 
Hard DriveOptical DriveOSMonitor
256GB SSD 8x DL "SuperDrive" OS X 10.7 Lion 27" 2560x1440 iMac display 
Monitor
27" Apple thunderbolt display 
  hide details  
Reply
Foldatron
(17 items)
 
Mat
(10 items)
 
Work iMac
(9 items)
 
CPUMotherboardGraphicsGraphics
i7 950 EVGA x58 3-way SLI EVGA GTX 660ti GTX 275 
RAMHard DriveHard DriveHard Drive
3x2GB Corsair Dominator DDR3-1600 80GB Intel X25-M SSD 2TB WD Black 150GB WD Raptor 
Hard DriveOSMonitorKeyboard
2x 150GB WD V-raptor in RAID0 Win7 Home 64-bit OEM 55" LED 120hz 1080p Vizio MS Natural Ergonomic Keyboard 4000 
PowerCase
750W PC P&C Silencer CoolerMaster 690 
CPUGraphicsRAMHard Drive
Intel Core i5 2500S AMD 6770M 8GB (2x4GB) at 1333Mhz 1TB, 7200 rpm 
Optical DriveOSMonitorKeyboard
LG 8X Dual-Layer "SuperDrive" OS X Lion 27" iMac screen Mac wireless keyboard 
Mouse
Mac wireless mouse 
CPUGraphicsRAMHard Drive
i7-2600K AMD 6970M 1GB 16GB PC3-10600 DDR3 1TB 7200rpm 
Hard DriveOptical DriveOSMonitor
256GB SSD 8x DL "SuperDrive" OS X 10.7 Lion 27" 2560x1440 iMac display 
Monitor
27" Apple thunderbolt display 
  hide details  
Reply
post #27 of 31
Quote:
Originally Posted by ronnin426850 View Post
For many entries, HashTable is an alwful, alwful collection. It almost never has O(1) access, and worst case is as low as O(n) + overhead (heavy).
Where BinarySearch is guaranteed O(logn), which is very fast for large collections.
The comparison between sorted and unsorted is useful when the sorted collection manages to stay faster in both insertion and retieval.
Hashtable operations are amortized O(1): O(1) inserts and O(1) accesses with an occasional O(n) resizing operation on insert. They're the prototypical example of minimizing time complexity at the expense of space complexity.
TheHydra
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 860 @ 3.6 EVGA P55 FTW Sapphire TOXIC 2GB 6950 CORSAIR XMS3 4 x 2GB CMX4GX3M2A1600C7 
Hard DriveOSKeyboardPower
C300 64Gb + 2x F3 HD103SJ 1TB in RAID 0 Win7 x64 Razer BlackWidow Corsair 750HX 
CaseMouseMouse Pad
Lian Li A05NB with 140mm top fan. Razer DeathAdder Razer Kabuto 
  hide details  
Reply
TheHydra
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 860 @ 3.6 EVGA P55 FTW Sapphire TOXIC 2GB 6950 CORSAIR XMS3 4 x 2GB CMX4GX3M2A1600C7 
Hard DriveOSKeyboardPower
C300 64Gb + 2x F3 HD103SJ 1TB in RAID 0 Win7 x64 Razer BlackWidow Corsair 750HX 
CaseMouseMouse Pad
Lian Li A05NB with 140mm top fan. Razer DeathAdder Razer Kabuto 
  hide details  
Reply
post #28 of 31
Thread Starter 
I PMd lordikon, don't want to spam this thread with HashMap, it's a bit off topic Already too much stuff in here.. THank you
My Rig
(14 items)
 
Ex-wife's Rig
(15 items)
 
 
CPUMotherboardGraphicsRAM
Core i5 4460 AsRock H81M-DG4 Sapphire Rx470 Platinum KVR 1600 16Gb 
Hard DriveHard DriveCoolingOS
2x Seagate 3Tb Samsung 850 EVO 120 Scythe Ninja 3 Rev.B Windows 10 Pro 
MonitorKeyboardPowerCase
Fujitsu Siemens A17-2A Logitech K280e SuperFlower SF-550K12XP Thermaltake Versa H25 
MouseAudio
Logitech G402 Sony MDR XD150 
CPUMotherboardGraphicsRAM
Athlon 750K 4.0Ghz AsRock FM2A75 Pro4+ Sapphire R9 270X Dual-X Kingston 2x4Gb 1600 
Hard DriveHard DriveOptical DriveCooling
Samsung 850 EVO 120  Western Digital 320Gb LiteON DVD-RW CoolerMaster Hyper Z600 
OSMonitorKeyboardPower
Windows 7 Pro x64 Toshiba 32" FullHD TV Logitech FSP Hexa 550 
CaseMouse
DeLUX Logitech 
  hide details  
Reply
My Rig
(14 items)
 
Ex-wife's Rig
(15 items)
 
 
CPUMotherboardGraphicsRAM
Core i5 4460 AsRock H81M-DG4 Sapphire Rx470 Platinum KVR 1600 16Gb 
Hard DriveHard DriveCoolingOS
2x Seagate 3Tb Samsung 850 EVO 120 Scythe Ninja 3 Rev.B Windows 10 Pro 
MonitorKeyboardPowerCase
Fujitsu Siemens A17-2A Logitech K280e SuperFlower SF-550K12XP Thermaltake Versa H25 
MouseAudio
Logitech G402 Sony MDR XD150 
CPUMotherboardGraphicsRAM
Athlon 750K 4.0Ghz AsRock FM2A75 Pro4+ Sapphire R9 270X Dual-X Kingston 2x4Gb 1600 
Hard DriveHard DriveOptical DriveCooling
Samsung 850 EVO 120  Western Digital 320Gb LiteON DVD-RW CoolerMaster Hyper Z600 
OSMonitorKeyboardPower
Windows 7 Pro x64 Toshiba 32" FullHD TV Logitech FSP Hexa 550 
CaseMouse
DeLUX Logitech 
  hide details  
Reply
post #29 of 31
Thread Starter 
OK, re-ran the test on the non-sorted collections - .NET List<T> and my implementation, DHList (changed the name).

Here are the logs for 10k, 100k, 1M and 10M, Growing, Reverse and Random strings tests. You can see my list obliterating .NET's with from 2x (10k and 100k tests) up to 60x better times (10M test).
StopWatch, List<T>.FindIndex and separate array for the random strings were used, following your kind requests

(expect the results with Sorted collections next week)

Logs:
Code:
 
STRING TEST /0
GROWING STRING TEST /
List constructed in 0
Writing to List..
Writing 10000 entries to List took 0

Locating 0 in List..
Parsing List took 0

Locating 1000 in List..
Parsing List took 0

Locating 2000 in List..
Parsing List took 1

Locating 3000 in List..
Parsing List took 1

Locating 4000 in List..
Parsing List took 2

Locating 5000 in List..
Parsing List took 2

Locating 6000 in List..
Parsing List took 3

Locating 7000 in List..
Parsing List took 4

Locating 8000 in List..
Parsing List took 4

Locating 9000 in List..
Parsing List took 5

Locating 10000 in List..
Parsing List took 5

REVERSE STRING TEST /
List constructed in 0
Writing to List..
Writing 10000 entries to List took 0

Locating 0 in List..
Parsing List took 2

Locating 1000 in List..
Parsing List took 6

Locating 2000 in List..
Parsing List took 4

Locating 3000 in List..
Parsing List took 7

Locating 4000 in List..
Parsing List took 3

Locating 5000 in List..
Parsing List took 2

Locating 6000 in List..
Parsing List took 2

Locating 7000 in List..
Parsing List took 1

Locating 8000 in List..
Parsing List took 1

Locating 9000 in List..
Parsing List took 0

Locating 10000 in List..
Parsing List took 0

RANDOM(cached) STRING TEST /
List constructed in 0
Writing to List..
Writing 10000 entries to List took 0

Locating 0 in List..
Parsing List took 2

Locating 1000 in List..
Parsing List took 6

Locating 2000 in List..
Parsing List took 5

Locating 3000 in List..
Parsing List took 5

Locating 4000 in List..
Parsing List took 5

Locating 5000 in List..
Parsing List took 5

Locating 6000 in List..
Parsing List took 5

Locating 7000 in List..
Parsing List took 5

Locating 8000 in List..
Parsing List took 5

Locating 9000 in List..
Parsing List took 5

Locating 10000 in List..
Parsing List took 5


GROWING STRING TEST /
DHList constructed in 0
Writing to DHList..
Writing 10000 entries to DHList took 1

Locating 0 in DHList..
Parsing DHList took 2

Locating 1000 in DHList..
Parsing DHList took 0

Locating 2000 in DHList..
Parsing DHList took 0

Locating 3000 in DHList..
Parsing DHList took 0

Locating 4000 in DHList..
Parsing DHList took 0

Locating 5000 in DHList..
Parsing DHList took 0

Locating 6000 in DHList..
Parsing DHList took 0

Locating 7000 in DHList..
Parsing DHList took 0

Locating 8000 in DHList..
Parsing DHList took 0

Locating 9000 in DHList..
Parsing DHList took 0

Locating 10000 in DHList..
Parsing DHList took 0

REVERSE STRING TEST /
DHList constructed in 0
Writing to DHList..
Writing 10000 entries to DHList took 2

Locating 0 in DHList..
Parsing DHList took 0

Locating 1000 in DHList..
Parsing DHList took 0

Locating 2000 in DHList..
Parsing DHList took 0

Locating 3000 in DHList..
Parsing DHList took 0

Locating 4000 in DHList..
Parsing DHList took 0

Locating 5000 in DHList..
Parsing DHList took 0

Locating 6000 in DHList..
Parsing DHList took 0

Locating 7000 in DHList..
Parsing DHList took 0

Locating 8000 in DHList..
Parsing DHList took 0

Locating 9000 in DHList..
Parsing DHList took 0

Locating 10000 in DHList..
Parsing DHList took 0

RANDOM(cached) STRING TEST /
DHList constructed in 0
Writing to DHList..
Writing 10000 entries to DHList took 0

Locating 0 in DHList..
Parsing DHList took 0

Locating 1000 in DHList..
Parsing DHList took 0

Locating 2000 in DHList..
Parsing DHList took 0

Locating 3000 in DHList..
Parsing DHList took 0

Locating 4000 in DHList..
Parsing DHList took 0

Locating 5000 in DHList..
Parsing DHList took 0

Locating 6000 in DHList..
Parsing DHList took 0

Locating 7000 in DHList..
Parsing DHList took 0

Locating 8000 in DHList..
Parsing DHList took 0

Locating 9000 in DHList..
Parsing DHList took 0

Locating 10000 in DHList..
Parsing DHList took 0


Done. Press Enter..


STRING TEST /1
GROWING STRING TEST /
List constructed in 0
Writing to List..
Writing 100000 entries to List took 9

Locating 0 in List..
Parsing List took 0

Locating 10000 in List..
Parsing List took 6

Locating 20000 in List..
Parsing List took 11

Locating 30000 in List..
Parsing List took 23

Locating 40000 in List..
Parsing List took 22

Locating 50000 in List..
Parsing List took 29

Locating 60000 in List..
Parsing List took 35

Locating 70000 in List..
Parsing List took 47

Locating 80000 in List..
Parsing List took 48

Locating 90000 in List..
Parsing List took 56

Locating 100000 in List..
Parsing List took 61

REVERSE STRING TEST /
List constructed in 0
Writing to List..
Writing 100000 entries to List took 12

Locating 0 in List..
Parsing List took 25

Locating 10000 in List..
Parsing List took 75

Locating 20000 in List..
Parsing List took 48

Locating 30000 in List..
Parsing List took 42

Locating 40000 in List..
Parsing List took 36

Locating 50000 in List..
Parsing List took 29

Locating 60000 in List..
Parsing List took 24

Locating 70000 in List..
Parsing List took 18

Locating 80000 in List..
Parsing List took 11

Locating 90000 in List..
Parsing List took 6

Locating 100000 in List..
Parsing List took 0

RANDOM(cached) STRING TEST /
List constructed in 0
Writing to List..
Writing 100000 entries to List took 2

Locating 0 in List..
Parsing List took 27

Locating 10000 in List..
Parsing List took 70

Locating 20000 in List..
Parsing List took 59

Locating 30000 in List..
Parsing List took 59

Locating 40000 in List..
Parsing List took 58

Locating 50000 in List..
Parsing List took 57

Locating 60000 in List..
Parsing List took 59

Locating 70000 in List..
Parsing List took 58

Locating 80000 in List..
Parsing List took 59

Locating 90000 in List..
Parsing List took 61

Locating 100000 in List..
Parsing List took 62


GROWING STRING TEST /
DHList constructed in 0
Writing to DHList..
Writing 100000 entries to DHList took 14

Locating 0 in DHList..
Parsing DHList took 12

Locating 10000 in DHList..
Parsing DHList took 9

Locating 20000 in DHList..
Parsing DHList took 9

Locating 30000 in DHList..
Parsing DHList took 29

Locating 40000 in DHList..
Parsing DHList took 29

Locating 50000 in DHList..
Parsing DHList took 9

Locating 60000 in DHList..
Parsing DHList took 9

Locating 70000 in DHList..
Parsing DHList took 29

Locating 80000 in DHList..
Parsing DHList took 29

Locating 90000 in DHList..
Parsing DHList took 9

Locating 100000 in DHList..
Parsing DHList took 9

REVERSE STRING TEST /
DHList constructed in 0
Writing to DHList..
Writing 100000 entries to DHList took 10

Locating 0 in DHList..
Parsing DHList took 8

Locating 10000 in DHList..
Parsing DHList took 9

Locating 20000 in DHList..
Parsing DHList took 9

Locating 30000 in DHList..
Parsing DHList took 9

Locating 40000 in DHList..
Parsing DHList took 9

Locating 50000 in DHList..
Parsing DHList took 9

Locating 60000 in DHList..
Parsing DHList took 9

Locating 70000 in DHList..
Parsing DHList took 29

Locating 80000 in DHList..
Parsing DHList took 9

Locating 90000 in DHList..
Parsing DHList took 9

Locating 100000 in DHList..
Parsing DHList took 29

RANDOM(cached) STRING TEST /
DHList constructed in 0
Writing to DHList..
Writing 100000 entries to DHList took 2

Locating 0 in DHList..
Parsing DHList took 16

Locating 10000 in DHList..
Parsing DHList took 9

Locating 20000 in DHList..
Parsing DHList took 29

Locating 30000 in DHList..
Parsing DHList took 9

Locating 40000 in DHList..
Parsing DHList took 9

Locating 50000 in DHList..
Parsing DHList took 9

Locating 60000 in DHList..
Parsing DHList took 9

Locating 70000 in DHList..
Parsing DHList took 29

Locating 80000 in DHList..
Parsing DHList took 9

Locating 90000 in DHList..
Parsing DHList took 9

Locating 100000 in DHList..
Parsing DHList took 9


Done. Press Enter..


STRING TEST /2
GROWING STRING TEST /
List constructed in 0
Writing to List..
Writing 1000000 entries to List took 181

Locating 0 in List..
Parsing List took 0

Locating 100000 in List..
Parsing List took 67

Locating 200000 in List..
Parsing List took 120

Locating 300000 in List..
Parsing List took 183

Locating 400000 in List..
Parsing List took 242

Locating 500000 in List..
Parsing List took 300

Locating 600000 in List..
Parsing List took 368

Locating 700000 in List..
Parsing List took 425

Locating 800000 in List..
Parsing List took 510

Locating 900000 in List..
Parsing List took 575

Locating 1000000 in List..
Parsing List took 621

REVERSE STRING TEST /
List constructed in 0
Writing to List..
Writing 1000000 entries to List took 149

Locating 0 in List..
Parsing List took 278

Locating 100000 in List..
Parsing List took 622

Locating 200000 in List..
Parsing List took 490

Locating 300000 in List..
Parsing List took 432

Locating 400000 in List..
Parsing List took 364

Locating 500000 in List..
Parsing List took 299

Locating 600000 in List..
Parsing List took 247

Locating 700000 in List..
Parsing List took 182

Locating 800000 in List..
Parsing List took 128

Locating 900000 in List..
Parsing List took 63

Locating 1000000 in List..
Parsing List took 0

RANDOM(cached) STRING TEST /
List constructed in 0
Writing to List..
Writing 1000000 entries to List took 22

Locating 0 in List..
Parsing List took 272

Locating 100000 in List..
Parsing List took 688

Locating 200000 in List..
Parsing List took 597

Locating 300000 in List..
Parsing List took 600

Locating 400000 in List..
Parsing List took 596

Locating 500000 in List..
Parsing List took 595

Locating 600000 in List..
Parsing List took 609

Locating 700000 in List..
Parsing List took 596

Locating 800000 in List..
Parsing List took 627

Locating 900000 in List..
Parsing List took 627

Locating 1000000 in List..
Parsing List took 626


GROWING STRING TEST /
DHList constructed in 0
Writing to DHList..
Writing 1000000 entries to DHList took 259

Locating 0 in DHList..
Parsing DHList took 6

Locating 100000 in DHList..
Parsing DHList took 9

Locating 200000 in DHList..
Parsing DHList took 9

Locating 300000 in DHList..
Parsing DHList took 19

Locating 400000 in DHList..
Parsing DHList took 19

Locating 500000 in DHList..
Parsing DHList took 9

Locating 600000 in DHList..
Parsing DHList took 9

Locating 700000 in DHList..
Parsing DHList took 19

Locating 800000 in DHList..
Parsing DHList took 19

Locating 900000 in DHList..
Parsing DHList took 19

Locating 1000000 in DHList..
Parsing DHList took 19

REVERSE STRING TEST /
DHList constructed in 0
Writing to DHList..
Writing 1000000 entries to DHList took 164

Locating 0 in DHList..
Parsing DHList took 25

Locating 100000 in DHList..
Parsing DHList took 19

Locating 200000 in DHList..
Parsing DHList took 19

Locating 300000 in DHList..
Parsing DHList took 19

Locating 400000 in DHList..
Parsing DHList took 9

Locating 500000 in DHList..
Parsing DHList took 9

Locating 600000 in DHList..
Parsing DHList took 19

Locating 700000 in DHList..
Parsing DHList took 19

Locating 800000 in DHList..
Parsing DHList took 9

Locating 900000 in DHList..
Parsing DHList took 9

Locating 1000000 in DHList..
Parsing DHList took 9

RANDOM(cached) STRING TEST /
DHList constructed in 0
Writing to DHList..
Writing 1000000 entries to DHList took 29

Locating 0 in DHList..
Parsing DHList took 19

Locating 100000 in DHList..
Parsing DHList took 19

Locating 200000 in DHList..
Parsing DHList took 19

Locating 300000 in DHList..
Parsing DHList took 19

Locating 400000 in DHList..
Parsing DHList took 19

Locating 500000 in DHList..
Parsing DHList took 19

Locating 600000 in DHList..
Parsing DHList took 19

Locating 700000 in DHList..
Parsing DHList took 19

Locating 800000 in DHList..
Parsing DHList took 19

Locating 900000 in DHList..
Parsing DHList took 19

Locating 1000000 in DHList..
Parsing DHList took 19


Done. Press Enter..


STRING TEST /3
GROWING STRING TEST /
List constructed in 0
Writing to List..
Writing 10000000 entries to List took 1871

Locating 0 in List..
Parsing List took 0

Locating 1000000 in List..
Parsing List took 702

Locating 2000000 in List..
Parsing List took 1205

Locating 3000000 in List..
Parsing List took 1845

Locating 4000000 in List..
Parsing List took 2407

Locating 5000000 in List..
Parsing List took 2987

Locating 6000000 in List..
Parsing List took 3674

Locating 7000000 in List..
Parsing List took 4226

Locating 8000000 in List..
Parsing List took 5015

Locating 9000000 in List..
Parsing List took 5440

Locating 10000000 in List..
Parsing List took 6158

REVERSE STRING TEST /
List constructed in 0
Writing to List..
Writing 10000000 entries to List took 2620

Locating 0 in List..
Parsing List took 2848

Locating 1000000 in List..
Parsing List took 6444

Locating 2000000 in List..
Parsing List took 5000

Locating 3000000 in List..
Parsing List took 4438

Locating 4000000 in List..
Parsing List took 3713

Locating 5000000 in List..
Parsing List took 3085

Locating 6000000 in List..
Parsing List took 2521

Locating 7000000 in List..
Parsing List took 1869

Locating 8000000 in List..
Parsing List took 1285

Locating 9000000 in List..
Parsing List took 620

Locating 10000000 in List..
Parsing List took 0

RANDOM(cached) STRING TEST /
List constructed in 0
Writing to List..
Writing 10000000 entries to List took 274

Locating 0 in List..
Parsing List took 2886

Locating 1000000 in List..
Parsing List took 7073

Locating 2000000 in List..
Parsing List took 6068

Locating 3000000 in List..
Parsing List took 6183

Locating 4000000 in List..
Parsing List took 6031

Locating 5000000 in List..
Parsing List took 5992

Locating 6000000 in List..
Parsing List took 6120

Locating 7000000 in List..
Parsing List took 6047

Locating 8000000 in List..
Parsing List took 6251

Locating 9000000 in List..
Parsing List took 6005

Locating 10000000 in List..
Parsing List took 6353


GROWING STRING TEST /
DHList constructed in 0
Writing to DHList..
Writing 10000000 entries to DHList took 1709

Locating 0 in DHList..
Parsing DHList took 16

Locating 1000000 in DHList..
Parsing DHList took 29

Locating 2000000 in DHList..
Parsing DHList took 49

Locating 3000000 in DHList..
Parsing DHList took 69

Locating 4000000 in DHList..
Parsing DHList took 99

Locating 5000000 in DHList..
Parsing DHList took 9

Locating 6000000 in DHList..
Parsing DHList took 29

Locating 7000000 in DHList..
Parsing DHList took 59

Locating 8000000 in DHList..
Parsing DHList took 79

Locating 9000000 in DHList..
Parsing DHList took 99

Locating 10000000 in DHList..
Parsing DHList took 109

REVERSE STRING TEST /
DHList constructed in 0
Writing to DHList..
Writing 10000000 entries to DHList took 2776

Locating 0 in DHList..
Parsing DHList took 112

Locating 1000000 in DHList..
Parsing DHList took 99

Locating 2000000 in DHList..
Parsing DHList took 79

Locating 3000000 in DHList..
Parsing DHList took 59

Locating 4000000 in DHList..
Parsing DHList took 29

Locating 5000000 in DHList..
Parsing DHList took 9

Locating 6000000 in DHList..
Parsing DHList took 99

Locating 7000000 in DHList..
Parsing DHList took 79

Locating 8000000 in DHList..
Parsing DHList took 59

Locating 9000000 in DHList..
Parsing DHList took 29

Locating 10000000 in DHList..
Parsing DHList took 9

RANDOM(cached) STRING TEST /
DHList constructed in 0
Writing to DHList..
Writing 10000000 entries to DHList took 307

Locating 0 in DHList..
Parsing DHList took 111

Locating 1000000 in DHList..
Parsing DHList took 109

Locating 2000000 in DHList..
Parsing DHList took 109

Locating 3000000 in DHList..
Parsing DHList took 109

Locating 4000000 in DHList..
Parsing DHList took 109

Locating 5000000 in DHList..
Parsing DHList took 109

Locating 6000000 in DHList..
Parsing DHList took 109

Locating 7000000 in DHList..
Parsing DHList took 109

Locating 8000000 in DHList..
Parsing DHList took 109

Locating 9000000 in DHList..
Parsing DHList took 109

Locating 10000000 in DHList..
Parsing DHList took 109


Done. Press Enter..
Code:
Code:
           
            long time = 0;
            System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch();
            sw.Reset();
            int i, i1 = 0;
            double l = 0;
            String temp;


            outputStream.WriteLine("GROWING STRING TEST /");
            Console.WriteLine("GROWING STRING TEST /");            
            #region List

            sw.Start();
            strList = new List<string>();
            time = sw.ElapsedMilliseconds;
            sw.Reset();
            outputStream.WriteLine("List constructed in " + time);
            Console.WriteLine("List constructed in " + time);

            outputStream.WriteLine("Writing to List..");
            Console.WriteLine("Writing to List..");
            i = 0;
            sw.Start();
            while (i < n)
            {
                strList.Add(i.ToString());
                i++;
            }
            time = sw.ElapsedMilliseconds;
            sw.Reset();
            outputStream.WriteLine("Writing " + n + " entries to List took " + time);
            Console.WriteLine("Writing " + n + " entries to List took " + time);

            l = 0;
            while (l <= 1)
            {
                Console.WriteLine();
                outputStream.WriteLine();
                outputStream.WriteLine("Locating " + l * n + " in List..");
                Console.WriteLine("Locating " + l * n + " in List..");
                sw.Start();
                i1 = strList.FindIndex(s => s == (l * n).ToString());
                time = sw.ElapsedMilliseconds;
                sw.Reset();
                Console.WriteLine("FOUND @" + i1);
                outputStream.WriteLine("Parsing List took " + time);
                Console.WriteLine("Parsing List took " + time);
                l += 0.1;
            }

            Console.WriteLine();
            outputStream.WriteLine();

            strList = null;

            #endregion

            outputStream.WriteLine("REVERSE STRING TEST /");
            Console.WriteLine("REVERSE STRING TEST /");
            #region ListReverse

            sw.Start();
            strList = new List<string>();
            time = sw.ElapsedMilliseconds;
            sw.Reset();

            outputStream.WriteLine("List constructed in " + time);
            Console.WriteLine("List constructed in " + time);
            outputStream.WriteLine("Writing to List..");
            Console.WriteLine("Writing to List..");
            i = n;
            sw.Start();
            while (i > 0)
            {
                strList.Add(i.ToString());
                i--;
            }
            time = sw.ElapsedMilliseconds;
            sw.Reset();
            outputStream.WriteLine("Writing " + n + " entries to List took " + time);
            Console.WriteLine("Writing " + n + " entries to List took " + time);

            l = 0;
            while (l <= 1)
            {
                Console.WriteLine();
                outputStream.WriteLine();
                outputStream.WriteLine("Locating " + l * n + " in List..");
                Console.WriteLine("Locating " + l * n + " in List..");
                sw.Start();
                i1 = strList.FindIndex(s => s == (l * n).ToString());
                time = sw.ElapsedMilliseconds;
                sw.Reset();
                Console.WriteLine("FOUND @" + i1);
                outputStream.WriteLine("Parsing List took " + time);
                Console.WriteLine("Parsing List took " + time);
                l += 0.1;
            }

            Console.WriteLine();
            outputStream.WriteLine();

            strList = null;

            #endregion

            outputStream.WriteLine("RANDOM(cached) STRING TEST /");
            Console.WriteLine("RANDOM(cached) STRING TEST /");
            #region ListRandom
            sw.Start();
            strList = new List<string>();
            time = sw.ElapsedMilliseconds;
            sw.Reset();

            outputStream.WriteLine("List constructed in " + time);
            Console.WriteLine("List constructed in " + time);
            outputStream.WriteLine("Writing to List..");
            Console.WriteLine("Writing to List..");
            i = 0;
            sw.Start();
            while (i <n)
            {
                strList.Add(source[i]);
                i++;
            }
            time = sw.ElapsedMilliseconds;
            sw.Reset();
            outputStream.WriteLine("Writing " + n + " entries to List took " + time);
            Console.WriteLine("Writing " + n + " entries to List took " + time);

            l = 0;
            while (l <= 1)
            {
                Console.WriteLine();
                outputStream.WriteLine();
                outputStream.WriteLine("Locating " + l * n + " in List..");
                Console.WriteLine("Locating " + l * n + " in List..");
                sw.Start();
                i1 = strList.FindIndex(s => s == (l * n).ToString());
                time = sw.ElapsedMilliseconds;
                sw.Reset();
                Console.WriteLine("FOUND @" + i1);
                outputStream.WriteLine("Parsing List took " + time);
                Console.WriteLine("Parsing List took " + time);
                l += 0.1;
            }

            Console.WriteLine();
            outputStream.WriteLine();

            strList = null;

            #endregion


            Console.WriteLine();
            outputStream.WriteLine();

            outputStream.WriteLine("GROWING STRING TEST /");
            Console.WriteLine("GROWING STRING TEST /");
            #region DHList Unsorted

            sw.Start();
            strListProUnsorted = new DHList<string>();
            time = sw.ElapsedMilliseconds;
            sw.Reset();
            outputStream.WriteLine("DHList constructed in " + time);
            Console.WriteLine("DHList constructed in " + time);

            outputStream.WriteLine("Writing to DHList..");
            Console.WriteLine("Writing to DHList..");
            i = 0;
            sw.Start();
            while (i < n)
            {
                strListProUnsorted.Add(i.ToString());
                i++;
            }
            time = sw.ElapsedMilliseconds;
            sw.Reset();
            outputStream.WriteLine("Writing " + n + " entries to DHList took " + time);
            Console.WriteLine("Writing " + n + " entries to DHList took " + time);

            l = 0;
            while (l <= 1)
            {
                Console.WriteLine();
                outputStream.WriteLine();
                outputStream.WriteLine("Locating " + l * n + " in DHList..");
                Console.WriteLine("Locating " + l * n + " in DHList..");
                sw.Start();
                i1 = strListProUnsorted.IndexOf((l * n).ToString());
                time = sw.ElapsedMilliseconds;
                sw.Reset();
                Console.WriteLine("FOUND @" + i1);
                outputStream.WriteLine("Parsing DHList took " + time);
                Console.WriteLine("Parsing DHList took " + time);
                l += 0.1;
            }

            Console.WriteLine();
            outputStream.WriteLine();

            strListProUnsorted = null;

            #endregion

            outputStream.WriteLine("REVERSE STRING TEST /");
            Console.WriteLine("REVERSE STRING TEST /");
            #region DHList Unsorted Reverse

            sw.Start();
            strListProUnsorted = new DHList<string>();
            time = sw.ElapsedMilliseconds;
            sw.Reset();
            outputStream.WriteLine("DHList constructed in " + time);
            Console.WriteLine("DHList constructed in " + time);

            outputStream.WriteLine("Writing to DHList..");
            Console.WriteLine("Writing to DHList..");
            i = n;
            sw.Start();
            while (i >0)
            {
                strListProUnsorted.Add(i.ToString());
                i--;
            }
            time = sw.ElapsedMilliseconds;
            sw.Reset();
            outputStream.WriteLine("Writing " + n + " entries to DHList took " + time);
            Console.WriteLine("Writing " + n + " entries to DHList took " + time);

            l = 0;
            while (l <= 1)
            {
                Console.WriteLine();
                outputStream.WriteLine();
                outputStream.WriteLine("Locating " + l * n + " in DHList..");
                Console.WriteLine("Locating " + l * n + " in DHList..");
                sw.Start();
                i1 = strListProUnsorted.IndexOf((l * n).ToString());
                time = sw.ElapsedMilliseconds;
                sw.Reset();
                Console.WriteLine("FOUND @" + i1);
                outputStream.WriteLine("Parsing DHList took " + time);
                Console.WriteLine("Parsing DHList took " + time);
                l += 0.1;
            }

            Console.WriteLine();
            outputStream.WriteLine();

            strListProUnsorted = null;

            #endregion

            outputStream.WriteLine("RANDOM(cached) STRING TEST /");
            Console.WriteLine("RANDOM(cached) STRING TEST /");
            #region DHList Unsorted Random

            sw.Start();
            strListProUnsorted = new DHList<string>();
            time = sw.ElapsedMilliseconds;
            sw.Reset();
            outputStream.WriteLine("DHList constructed in " + time);
            Console.WriteLine("DHList constructed in " + time);

            outputStream.WriteLine("Writing to DHList..");
            Console.WriteLine("Writing to DHList..");
            i = 0;
            sw.Start();
            while (i <n)
            {
                strListProUnsorted.Add(source[i]);
                i++;
            }
            time = sw.ElapsedMilliseconds;
            sw.Reset();
            outputStream.WriteLine("Writing " + n + " entries to DHList took " + time);
            Console.WriteLine("Writing " + n + " entries to DHList took " + time);

            l = 0;
            while (l <= 1)
            {
                Console.WriteLine();
                outputStream.WriteLine();
                outputStream.WriteLine("Locating " + l * n + " in DHList..");
                Console.WriteLine("Locating " + l * n + " in DHList..");
                sw.Start();
                i1 = strListProUnsorted.IndexOf((l * n).ToString());
                time = sw.ElapsedMilliseconds;
                sw.Reset();
                Console.WriteLine("FOUND @" + i1);
                outputStream.WriteLine("Parsing DHList took " + time);
                Console.WriteLine("Parsing DHList took " + time);
                l += 0.1;
            }

            Console.WriteLine();
            outputStream.WriteLine();

            strListProUnsorted = null;

            #endregion

            Console.WriteLine();
            outputStream.WriteLine();
My Rig
(14 items)
 
Ex-wife's Rig
(15 items)
 
 
CPUMotherboardGraphicsRAM
Core i5 4460 AsRock H81M-DG4 Sapphire Rx470 Platinum KVR 1600 16Gb 
Hard DriveHard DriveCoolingOS
2x Seagate 3Tb Samsung 850 EVO 120 Scythe Ninja 3 Rev.B Windows 10 Pro 
MonitorKeyboardPowerCase
Fujitsu Siemens A17-2A Logitech K280e SuperFlower SF-550K12XP Thermaltake Versa H25 
MouseAudio
Logitech G402 Sony MDR XD150 
CPUMotherboardGraphicsRAM
Athlon 750K 4.0Ghz AsRock FM2A75 Pro4+ Sapphire R9 270X Dual-X Kingston 2x4Gb 1600 
Hard DriveHard DriveOptical DriveCooling
Samsung 850 EVO 120  Western Digital 320Gb LiteON DVD-RW CoolerMaster Hyper Z600 
OSMonitorKeyboardPower
Windows 7 Pro x64 Toshiba 32" FullHD TV Logitech FSP Hexa 550 
CaseMouse
DeLUX Logitech 
  hide details  
Reply
My Rig
(14 items)
 
Ex-wife's Rig
(15 items)
 
 
CPUMotherboardGraphicsRAM
Core i5 4460 AsRock H81M-DG4 Sapphire Rx470 Platinum KVR 1600 16Gb 
Hard DriveHard DriveCoolingOS
2x Seagate 3Tb Samsung 850 EVO 120 Scythe Ninja 3 Rev.B Windows 10 Pro 
MonitorKeyboardPowerCase
Fujitsu Siemens A17-2A Logitech K280e SuperFlower SF-550K12XP Thermaltake Versa H25 
MouseAudio
Logitech G402 Sony MDR XD150 
CPUMotherboardGraphicsRAM
Athlon 750K 4.0Ghz AsRock FM2A75 Pro4+ Sapphire R9 270X Dual-X Kingston 2x4Gb 1600 
Hard DriveHard DriveOptical DriveCooling
Samsung 850 EVO 120  Western Digital 320Gb LiteON DVD-RW CoolerMaster Hyper Z600 
OSMonitorKeyboardPower
Windows 7 Pro x64 Toshiba 32" FullHD TV Logitech FSP Hexa 550 
CaseMouse
DeLUX Logitech 
  hide details  
Reply
post #30 of 31
Quote:
Originally Posted by ronnin426850 View Post
OK, re-ran the test on the non-sorted collections - .NET List<T> and my implementation, DHList (changed the name).

Here are the logs for 10k, 100k, 1M and 10M, Growing, Reverse and Random strings tests. You can see my list obliterating .NET's with from 2x (10k and 100k tests) up to 60x better times (10M test).
StopWatch, List<T>.FindIndex and separate array for the random strings were used, following your kind requests

(expect the results with Sorted collections next week)
Interesting results. I've never used a list to search like that. Generally I would use a dictionary for quick access. But if your results are accurate and have no downsides to them, I'd be curious why MS didn't implement the List that way in the first place.

Some things to consider with your implementation are things like cache misses, the amount of memory your list consumes, etc. You may be trading faster random access times for something else.
Foldatron
(17 items)
 
Mat
(10 items)
 
Work iMac
(9 items)
 
CPUMotherboardGraphicsGraphics
i7 950 EVGA x58 3-way SLI EVGA GTX 660ti GTX 275 
RAMHard DriveHard DriveHard Drive
3x2GB Corsair Dominator DDR3-1600 80GB Intel X25-M SSD 2TB WD Black 150GB WD Raptor 
Hard DriveOSMonitorKeyboard
2x 150GB WD V-raptor in RAID0 Win7 Home 64-bit OEM 55" LED 120hz 1080p Vizio MS Natural Ergonomic Keyboard 4000 
PowerCase
750W PC P&C Silencer CoolerMaster 690 
CPUGraphicsRAMHard Drive
Intel Core i5 2500S AMD 6770M 8GB (2x4GB) at 1333Mhz 1TB, 7200 rpm 
Optical DriveOSMonitorKeyboard
LG 8X Dual-Layer "SuperDrive" OS X Lion 27" iMac screen Mac wireless keyboard 
Mouse
Mac wireless mouse 
CPUGraphicsRAMHard Drive
i7-2600K AMD 6970M 1GB 16GB PC3-10600 DDR3 1TB 7200rpm 
Hard DriveOptical DriveOSMonitor
256GB SSD 8x DL "SuperDrive" OS X 10.7 Lion 27" 2560x1440 iMac display 
Monitor
27" Apple thunderbolt display 
  hide details  
Reply
Foldatron
(17 items)
 
Mat
(10 items)
 
Work iMac
(9 items)
 
CPUMotherboardGraphicsGraphics
i7 950 EVGA x58 3-way SLI EVGA GTX 660ti GTX 275 
RAMHard DriveHard DriveHard Drive
3x2GB Corsair Dominator DDR3-1600 80GB Intel X25-M SSD 2TB WD Black 150GB WD Raptor 
Hard DriveOSMonitorKeyboard
2x 150GB WD V-raptor in RAID0 Win7 Home 64-bit OEM 55" LED 120hz 1080p Vizio MS Natural Ergonomic Keyboard 4000 
PowerCase
750W PC P&C Silencer CoolerMaster 690 
CPUGraphicsRAMHard Drive
Intel Core i5 2500S AMD 6770M 8GB (2x4GB) at 1333Mhz 1TB, 7200 rpm 
Optical DriveOSMonitorKeyboard
LG 8X Dual-Layer "SuperDrive" OS X Lion 27" iMac screen Mac wireless keyboard 
Mouse
Mac wireless mouse 
CPUGraphicsRAMHard Drive
i7-2600K AMD 6970M 1GB 16GB PC3-10600 DDR3 1TB 7200rpm 
Hard DriveOptical DriveOSMonitor
256GB SSD 8x DL "SuperDrive" OS X 10.7 Lion 27" 2560x1440 iMac display 
Monitor
27" Apple thunderbolt display 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Coding and Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › [Benchmark] .NET4 vs Hand-made collections