Performance: deepmesa::LinkedList vs std::LinkedList
cargo
docs
github

The deepmesa linked list was designed to be fast. Here we demonstrate the performance gains against std::LinkedList.

push_front() is 2x faster

The Deepmesa Linkedlist is 2x faster at pushing elements to the front of the list. This is primarily because the list doesn't have to allocate memory on every push

push_back() is 2x faster

Similarly, the Deepmesa Linkedlist is 2x faster at pushing elements to the back of the list. Again, this is because the list doesn't have to allocate memory on every push

pop_front() is more than 2x faster

The Deepmesa Linkedlist is 2x faster at popping elements from the front of the list. This is primarily because the list doesn't have to deallocate memory on every pop

pop_back() is more than 2x faster

The Deepmesa Linkedlist is 2x faster at popping elements from the back of the list. This is because the list doesn't have to deallocate memory on every pop

push_middle() is 35% faster than std:push_front()

std::LinkedList doesn't allow pushing in the middle of the list so we benchmark against pushing to the front of the list. Pushing in the middle of the deepmesa list is a faster constant time operation than pushing to the front of the std::LinkedList.

privacy about

Copyright (c) 2021, Rahul Singh
Opinions expressed are solely my own and do not express the views or opinions of my employer