Welcome to the Lounge
The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
|I've seen the reference implementations for dictionary and sorted dictionary. I've even fiddled with them in binary form way back when with Reflector. I expect the inserts and removal times to be longer - i'd be surprised if they weren't, but the searches? This is just wrong.
(The AVL tree implementation sucks - it will be improved)
Dictionary adds: 2.3903ms
Sorted Dictionary adds: 4.5114ms
SortedAvlTreeDictionary adds: 845.7137ms
SortedBTreeDictionary adds: 6.4452ms
Dictionary searches: 0.6058ms
Sorted Dictionary searches: 1.9608ms
SortedAvlTreeDictionary searches: 2.4709ms
SortedBTreeDictionary searches: 1.8993ms
Dictionary removes: 0.5806ms
Sorted Dictionary removes: 3.5787ms
SortedAvlTreeDictionary removes: 676.9056ms
SortedBTreeDictionary removes: 4.5226ms
There's NO WAY this is happening without some black magic. Like some specialized op for their dictionaries.
changes tests to 1 million items per dictionary
Dictionary adds: 514.7477ms
Sorted Dictionary adds: 1367.028ms
SortedBTreeDictionary adds: 1039.1983ms
Dictionary searches: 88.4017ms
Sorted Dictionary searches: 410.1569ms
SortedBTreeDictionary searches: 138.451ms
Dictionary removes: 84.7735ms
Sorted Dictionary removes: 725.1243ms
SortedBTreeDictionary removes: 350.6078ms
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
modified 11-Sep-19 22:31pm.
General News Suggestion Question Bug Answer Joke Praise Rant Admin
Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.