Tag Archives: index operator

.NET Sorted Dictionary vs. PTL Map32 – Add, Item & Remove Functions

Our latest Parallel Template Library (PTL) video demonstrates the performance of PTL’s map container, Map32, for large data sets by comparing it to the equivalent .NET SortedDictionary container.

During the demo, we add, retrieve and remove 100 million elements (which consist of a key and a value) from both map containers on a system with a quad-core processor and 32 GB of memory. PTL’s Map32 inserted elements 3.8 times faster, retrieved elements 2.1 times faster and erased elements 2.8 times faster than .NET’s SortedDictionary.

A map is a variable-sized collection of (key, value) pairs. Its primary usage is the efficient retrieval of elements (or values) based on their associated keys. It also implements the insertion and removal of elements very efficiently.

PTL offers Map32 and Map64 classes that are very similar to the .NET SortedDictionary class. PTL maps differ from the .NET SortedDictionary because they have a Boolean property called “Unique” that is set in their constructor and indicates if the map allows or disallows duplicate keys. The .NET SortedDictionary only allows elements with unique keys. It’s also important to note that PTL’s Map32 and Map64 are not tuned for a 32 or 64-bit operating system; they only differ in their maximum size.

Read More >>

LinkedInGoogle+TwitterFacebookGoogle GmailShare