TheBuzzSaw wrote:STD == STL ?
STL usually refers to C++ STD's containers and algorithms, but I don't think it is an official term.
I should probably take this opportunity to point out why standard containers are good: they are GUARANTEED to have certain functionality, no matter what platform you're on.
All of the code for PTL uses standard C++ right now - it should compile fine for nearly every architecture/compiler. The speed benefits from using it are all done higher up - no inline assembly needed.
It may not be perfect, that's for sure, but if you're compiling a program for a platform with a shitty STL implementation, nothing is changing you from making a more efficient one for you compiler (provided you maintain the same interface).
Users who wish to make more efficient containers is exactly what this library is for. The STD is great, but it fails to deliver when the user wishes to modify it. There are always STD allocators, but they are clunky and never seem to fulfill what needs to be done.
If making PTL is a learning experience for you, go for it. However, don't forsake standards simply because you think it can be done better your way.
Definitely not a learning experience.
One thing people need to understand is that STD is standardized, but that doesn't mean it is a standard to code by. You shouldn't blindly use it just because you need a certain container - there are likely much better solutions in other libraries, yet many people never discover them because they are too busy using the golden hammer known as STD.
What does one do when they see a small optimization that can be made in their program? Of course, nearly every programmer would implement it, but things get difficult when the code is hidden behind a wall of STD code. For instance, what if you want to remove every node in a linked list except the first and last node? Using the STD, you would end up with several unnecessary operations - you know you simply want to iterate+destroy the inner nodes, then set first pointer to last. This is exactly what PTL is for: create a new PTL container, then add in your method - no boilerplate code needed. Much better than having to rewrite an entire list class just to use a method that wasn't in the STD.