Why is STL so slow?

Started by
34 comments, last by Vorlath 21 years, 9 months ago
quote:Original post by Stoffel

quote: "It's not ever worth using STL at all."

All generalizations are false.



hehe, isn't that one, too ?

paradox sentence...headache...


[edited by - UnshavenBastard on June 28, 2002 2:48:55 AM]
Advertisement
quote:Original post by Stoffel
Sounds like pilot error. I'm unaware of std::string leaks in MSVC 6.0's STL. We use strings extensively in several large projects. The one criticism I have heard about std::string is that it tends to make many small allocations, which can be a problem for certain memory models; I believe this can be solved with a custom allocator.


quote:Original post by daerid This is vc.net (vc7), not vc6

Maybe it was the debugger I was using, but I created a tiny char* wrapper that did what I needed, and eliminated the (perceived) leak.

[edited by - daerid on June 27, 2002 12:28:14 AM]


std::string in vc.net somehow maintain some internal buffer for very small bytes of char (say, maybe 16 or less).... and the buffer (just assumption) may not act as it is destructed in destructor (but freed in somewhere else)... so the debugger may detect leakage. so beware.

[edited by - DerekSaw on June 28, 2002 2:58:14 AM]
"after many years of singularity, i'm still searching on the event horizon"
quote:Original post by Stoffel
All generalizations are false.

Then why are we using templates? If generalizations are false, then all templates could be optimized to a single false-statement. Including STL would give us noting more than a lot of false-statements....
Arguing on the internet is like running in the Special Olympics: Even if you win, you're still retarded.[How To Ask Questions|STL Programmer's Guide|Bjarne FAQ|C++ FAQ Lite|C++ Reference|MSDN]
all science is about generalizations
Look at this. Debunking straight from the source...

Documents [ GDNet | MSDN | STL | OpenGL | Formats | RTFM | Asking Smart Questions ]
C++ Stuff [ MinGW | Loki | SDL | Boost. | STLport | FLTK | ACCU Recommended Books ]
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
You just _know_ it''s going to be bad if its crossposted to a *.*.advocacy group.
--AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [IRC channel] [Blog]

This topic is closed to new replies.

Advertisement