Furry Guy wrote: |
---|
Your objections about speed, readability and maintainability are VERY subjective |
Well-written code using the STL can rival "roll your own code" any day. |
I don't mean to cause a flamewar |
helios wrote: |
---|
Can you give an example? |
Furry Guy wrote: |
---|
The STL is written by people, read LOTS, who eat, sleep and live coding. |
Compile time is NOT performance when running the compiled code. |
helios wrote: |
---|
Can you give an example? |
Ceres Solver is 154 times faster in Release than in Debug. That's quite ridiculous. |
The STL (by I assume you mean the Standard Library) isn't a singular entity written by an elite squad of programmers. |
jlb wrote: |
---|
With what compiler? |
Debug builds will usually be slower for several reasons |
The STL should not be confused with the standard library. The standard language is a different entity, you can make a program that doesn't use the STL but it will still be using the standard library. |
Oh and I would say that both the STL and standard library are written by elite squads of programmers. |
Visual Studio 2015. |
I am stating that extensively using templates within your project can severly reduce your Debug build performance. |
Given that the standard library is a heavily templated library, |
Since a software developer spends most of their time debugging and maintaining code, this is very undesirable. |
The STL is the older library from the 90s that preceded the first C++ standard library. |
jlb wrote: |
---|
No, the STL, as we know it today, was not even part of the early pre-standard language |
Templates were added after the standard |
cppreference wrote: |
---|
1990: The Annotated C++ Reference Manual This book described the language as designed, including some features that were not yet implemented. It served as the de-facto standard until the ISO. New features: namespaces, exception handling, nested classes, templates |
wikipedia wrote: |
---|
The Standard Template Library (STL) is a software library for the C++ programming language that influenced many parts of the C++ Standard Library. It provides four components called algorithms, containers, functions, and iterators. ... Implementations Original STL implementation by Stepanov and Lee. 1994, Hewlett-Packard. No longer maintained. |
jlb wrote: |
---|
No the standard library is not heavily templates, in fact it has few if any template instances. |
With templates you usually have longer compile times and binary size |
but usually they don't affect runtime speed |
Is The Standard Library Really That Useful? |
As I find myself becoming more and more seasoned, I find that I use the standard library much less and less. At first, I made quite an effort to use "modern C++" (at this time this was C++11). |
Now, I find that using the standard library is quite distasteful for the most part. It's pretty bloated |
Takes forever to compile |
The code itself is completely unreadable |
Don't get me wrong- I'm no C purist. I love C++11 threads, I use vectors and strings in certain areas, auto-for-loops (is that what they're called? lol), etc, but I find that specialized, POD, data structures typically beat the "idiomatic" equivalent both in speed, readability, and mantainability. |
Am I the only one who feels like this? |
JagerDesu wrote: |
---|
As I find myself becoming more and more seasoned, I find that I use the standard library much less and less. |
JagerDesu wrote: |
---|
code itself is completely unreadable with literally all major compilers |
JagerDesu wrote: |
---|
as time goes on I typically end up rewriting it in a more C-with-classes fashion.[...] I find that specialized, POD, data structures typically beat the "idiomatic" equivalent both in speed, readability, and mantainability. |
JagerDesu wrote: |
---|
such as games [...] Am I the only one who feels like this? |