Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mattreecebentley/plf_stack
A C++ data container replicating std::stack functionality but with better performance than standard library containers in a stack context.
https://github.com/mattreecebentley/plf_stack
container cpp stack
Last synced: about 2 months ago
JSON representation
A C++ data container replicating std::stack functionality but with better performance than standard library containers in a stack context.
- Host: GitHub
- URL: https://github.com/mattreecebentley/plf_stack
- Owner: mattreecebentley
- License: zlib
- Created: 2016-10-03T20:38:31.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-07-17T02:42:38.000Z (6 months ago)
- Last Synced: 2024-08-03T12:01:23.811Z (5 months ago)
- Topics: container, cpp, stack
- Language: C++
- Homepage: https://plflib.org/stack.htm
- Size: 191 KB
- Stars: 63
- Watchers: 6
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-code-for-gamedev - mattreecebentley/plf_stack - A C++ data container replicating std::stack functionality but with better performance than standard library containers in a stack context. (Coding / C++ Data Structures and Algorithms)
README
# plf::stack
A data container replicating std::stack functionality but with better performance than standard library containers in a stack context.
C++98/03/11/14/etc-compatible. Full documentation/function descriptions here: https://plflib.org/stack.htmplf::stack is faster than all std:: containers in the context of a stack. It has the following averaged performance characteristics versus std::stack (assuming underlying container is the default, std::deque):
* 82% faster for 1 byte types
* 83% faster for 4 byte types
* 80% faster for 8 byte types
* 82% faster for 40 byte types
* 724% faster for 490 byte types (note: libstdc++ basically turns a deque into a linked list at this point due to their 512-byte limit on block capacities)Averaged across total numbers of stored elements ranging between 10 and 1000000. The benchmark in question is total time taken to construct, push all elements, read and pop all elements, then destruct.
Benchmarks are here: https://plflib.org/stack.htm#benchmarks