devxlogo

Efficiency of STL or Quality of Implementation?

Efficiency of STL or Quality of Implementation?

I often hear people ask whether it’s possible to write code that is quicker than STL.

This is a paradoxical question: the C++ Standard defines minimum performance requirements with which STL containers and algorithms must comply. This doesn’t mean that one cannot do better than that, and in fact, there are many STL implementations that utilize sophisticated optimizations to provide better performance (see STLPort.org for such an example) than the Standard’s minimum requirements. Thus, it all boils down to an issue called “quality of implementation.” Put differently, a better, faster, and slimmer STL implementation is still STL as long as it meets all the ANSI/ISO requirements. Thus, if you’re not satisfied with the performance of your default STL package, you may switch to another vendor’s STL package without having to switch to another compiler or IDE.

See also  lenso.ai - an AI reverse image search platform
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist