Click here to Skip to main content
15,885,856 members
Articles / Programming Languages / C++

find_first_of: A performance pitfall among the STL algorithms

Rate me:
Please Sign up or sign in to vote.
4.93/5 (36 votes)
18 Jun 2007CPOL18 min read 112.4K   247   26  
This article is discussing the performance problems found in the most notable find_first_of implementations and suggests useful improvements and workarounds.
Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "find_first_of", "find_first_of_2005.vcproj", "{A635F489-51F0-492D-AED2-F1D7A9EB150B}"
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|Win32 = Debug|Win32
		Release|Win32 = Release|Win32
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{A635F489-51F0-492D-AED2-F1D7A9EB150B}.Debug|Win32.ActiveCfg = Debug|Win32
		{A635F489-51F0-492D-AED2-F1D7A9EB150B}.Debug|Win32.Build.0 = Debug|Win32
		{A635F489-51F0-492D-AED2-F1D7A9EB150B}.Release|Win32.ActiveCfg = Release|Win32
		{A635F489-51F0-492D-AED2-F1D7A9EB150B}.Release|Win32.Build.0 = Release|Win32
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE
	EndGlobalSection
EndGlobal

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
Greece Greece
I live in Greece with my wife and our two daughters. I am a professional software developer since 1999, using mostly C/C++ in my work.

My main expertise are: C/C++, STL, software optimization, generic programming and debugging. I am also very experienced in client–server programming, communications, concurrent programming, software security and cryptography. Finally, in my early professional years, I have worked a lot on cross-platform programming (Mac+Win).

I am familiar with the MFC, wxWidgets and Cplat GUI frameworks and the Python, Java, Pascal, Fortran, Prolog and Rexx programming languages.

Comments and Discussions