<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>A howl on the wind... &#187; C++</title>
	<atom:link href="http://tinodidriksen.com/category/code/cpp/feed/" rel="self" type="application/rss+xml" />
	<link>http://tinodidriksen.com</link>
	<description>The words and ideas of Tino Didriksen</description>
	<lastBuildDate>Thu, 26 Apr 2012 16:00:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>C++ vector vs realloc()</title>
		<link>http://tinodidriksen.com/2012/02/25/cpp-vector-vs-realloc/</link>
		<comments>http://tinodidriksen.com/2012/02/25/cpp-vector-vs-realloc/#comments</comments>
		<pubDate>Sat, 25 Feb 2012 12:19:21 +0000</pubDate>
		<dc:creator>Tino Didriksen</dc:creator>
				<category><![CDATA[C++]]></category>

		<guid isPermaLink="false">http://tinodidriksen.com/?p=388</guid>
		<description><![CDATA[A comparison of how many reallocations a worse case poorly coded use of realloc() does, compared to just using std::vector. 10000000 integers are added to the containers one-by-one. Clearly you would never abuse realloc() like this in real code, but it&#8217;s interesting nonetheless. Idea from sacrebleu at Freenode&#8217;s ##C++. The full source is available in [...]]]></description>
		<wfw:commentRss>http://tinodidriksen.com/2012/02/25/cpp-vector-vs-realloc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>C++ Set Performance 2</title>
		<link>http://tinodidriksen.com/2012/02/20/cpp-set-performance-2/</link>
		<comments>http://tinodidriksen.com/2012/02/20/cpp-set-performance-2/#comments</comments>
		<pubDate>Mon, 20 Feb 2012 15:12:15 +0000</pubDate>
		<dc:creator>Tino Didriksen</dc:creator>
				<category><![CDATA[C++]]></category>

		<guid isPermaLink="false">http://tinodidriksen.com/?p=363</guid>
		<description><![CDATA[(Old version from 2010-04-02) A performance comparison of the speed of operations on the various set implementations used in C++. There are 16383 unique elements across which 1000000 insert, lookup, iterate, and erase operations are performed. The raw tick numbers are shown and table sorting is enabled so you can compare for yourself. Just be [...]]]></description>
		<wfw:commentRss>http://tinodidriksen.com/2012/02/20/cpp-set-performance-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>C++ Include Speed</title>
		<link>http://tinodidriksen.com/2011/08/31/cpp-include-speed/</link>
		<comments>http://tinodidriksen.com/2011/08/31/cpp-include-speed/#comments</comments>
		<pubDate>Wed, 31 Aug 2011 21:27:06 +0000</pubDate>
		<dc:creator>Tino Didriksen</dc:creator>
				<category><![CDATA[C++]]></category>

		<guid isPermaLink="false">http://tinodidriksen.com/?p=354</guid>
		<description><![CDATA[A performance benchmark of which include guard method is faster. Test times the compilation of a main.cpp that includes 10000 files 3 times each. The tested methods are: #pragma once followed by #ifndef #ifndef followed by #pragma once Only #pragma once Only #ifndef External #ifndef Sources for the test is at inc.tar.gz, but it&#8217;s just [...]]]></description>
		<wfw:commentRss>http://tinodidriksen.com/2011/08/31/cpp-include-speed/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>C++ Convert String to Double Speed</title>
		<link>http://tinodidriksen.com/2011/05/28/cpp-convert-string-to-double-speed/</link>
		<comments>http://tinodidriksen.com/2011/05/28/cpp-convert-string-to-double-speed/#comments</comments>
		<pubDate>Sat, 28 May 2011 18:04:13 +0000</pubDate>
		<dc:creator>Tino Didriksen</dc:creator>
				<category><![CDATA[C++]]></category>

		<guid isPermaLink="false">http://tinodidriksen.com/?p=347</guid>
		<description><![CDATA[(There is also a string-to-int performance test.) A performance benchmark of which method is faster of converting an std::string to a double. The goal is ending up with a double of the value represented in an std::string. The tested methods are: a hand-written naive loop atof() strtod() sscanf() boost::lexical_cast&#60;double&#62;() boost::spirit::qi::parse() std::stringstream std::stringstream, reusing the object [...]]]></description>
		<wfw:commentRss>http://tinodidriksen.com/2011/05/28/cpp-convert-string-to-double-speed/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>C++ String Compare Performance</title>
		<link>http://tinodidriksen.com/2011/02/10/cpp-string-compare-performance/</link>
		<comments>http://tinodidriksen.com/2011/02/10/cpp-string-compare-performance/#comments</comments>
		<pubDate>Thu, 10 Feb 2011 17:24:56 +0000</pubDate>
		<dc:creator>Tino Didriksen</dc:creator>
				<category><![CDATA[C++]]></category>

		<guid isPermaLink="false">http://tinodidriksen.com/?p=329</guid>
		<description><![CDATA[A performance comparison of the speed of various ways to compare strings in C++. In this test, all comparisons are of not-equal strings. Idea from #C++ on QuakeNet, where we always advocate using std::string over various char* functions. I wondered what, if any, the penalty for doing so was. Sources Ticks counted via cycle.h (local [...]]]></description>
		<wfw:commentRss>http://tinodidriksen.com/2011/02/10/cpp-string-compare-performance/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>C++ Read Whole File Performance</title>
		<link>http://tinodidriksen.com/2011/01/28/cpp-read-whole-file-performance/</link>
		<comments>http://tinodidriksen.com/2011/01/28/cpp-read-whole-file-performance/#comments</comments>
		<pubDate>Fri, 28 Jan 2011 15:21:01 +0000</pubDate>
		<dc:creator>Tino Didriksen</dc:creator>
				<category><![CDATA[C++]]></category>

		<guid isPermaLink="false">http://tinodidriksen.com/?p=323</guid>
		<description><![CDATA[A performance comparison of the speed of various ways to read an entire file into an std::string in C++. Idea from BD-Calvin in #C++ on QuakeNet. Sources Ticks counted via cycle.h (local mirror) Source: speed-read-whole-file.cpp File used was generated with dd if=/dev/urandom of=random100 bs=1M count=100 Things Tested writing to a stringstream, then pulling data out [...]]]></description>
		<wfw:commentRss>http://tinodidriksen.com/2011/01/28/cpp-read-whole-file-performance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>C++ dynamic_cast Performance</title>
		<link>http://tinodidriksen.com/2010/04/14/cpp-dynamic-cast-performance/</link>
		<comments>http://tinodidriksen.com/2010/04/14/cpp-dynamic-cast-performance/#comments</comments>
		<pubDate>Wed, 14 Apr 2010 19:41:21 +0000</pubDate>
		<dc:creator>Tino Didriksen</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[dynamic_cast]]></category>

		<guid isPermaLink="false">http://tinodidriksen.com/?p=269</guid>
		<description><![CDATA[(Updated 2010-10-27: Re-run the test with latest clang++ from subversion) A performance comparison of the speed of dynamic_cast operations in C++. Idea from http://www.nerdblog.com/2006/12/how-slow-is-dynamiccast.html, who did not provide any source so I wrote my own more extensive tests. Sources Ticks counted via cycle.h (local mirror) Source: speed-dynamic-cast.cpp Things Tested reinterpret_cast on a known type virtual [...]]]></description>
		<wfw:commentRss>http://tinodidriksen.com/2010/04/14/cpp-dynamic-cast-performance/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>C++ Set Performance</title>
		<link>http://tinodidriksen.com/2010/04/02/cpp-set-performance/</link>
		<comments>http://tinodidriksen.com/2010/04/02/cpp-set-performance/#comments</comments>
		<pubDate>Fri, 02 Apr 2010 18:11:11 +0000</pubDate>
		<dc:creator>Tino Didriksen</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[boost]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[set]]></category>

		<guid isPermaLink="false">http://tinodidriksen.com/?p=240</guid>
		<description><![CDATA[(newer version from 2012-02-20, older std::map benchmarks for GNU g++ 4.3.2 and MSVC++ 2010 beta 2) A performance comparison of the speed of operations on the various set implementations used in C++. There are 16383 unique elements across which 1000000 insert, lookup, iterate, and erase operations are performed. And this time I&#8217;ve left the raw [...]]]></description>
		<wfw:commentRss>http://tinodidriksen.com/2010/04/02/cpp-set-performance/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Language Comparison: Find Longest Line</title>
		<link>http://tinodidriksen.com/2010/03/17/language-comparison-find-longest-line/</link>
		<comments>http://tinodidriksen.com/2010/03/17/language-comparison-find-longest-line/#comments</comments>
		<pubDate>Wed, 17 Mar 2010 20:13:56 +0000</pubDate>
		<dc:creator>Tino Didriksen</dc:creator>
				<category><![CDATA[C]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[c++]]></category>

		<guid isPermaLink="false">http://tinodidriksen.com/?p=222</guid>
		<description><![CDATA[The task: Write a portable tool that takes a file name as first argument, and from that file outputs the number of lines, the longest line, the length of the longest line, and the line number of the longest line, in a binary-safe fashion (meaning, \n is the only reason a line should be delimited; [...]]]></description>
		<wfw:commentRss>http://tinodidriksen.com/2010/03/17/language-comparison-find-longest-line/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>C++ Convert String to Int Speed</title>
		<link>http://tinodidriksen.com/2010/02/16/cpp-convert-string-to-int-speed/</link>
		<comments>http://tinodidriksen.com/2010/02/16/cpp-convert-string-to-int-speed/#comments</comments>
		<pubDate>Tue, 16 Feb 2010 18:58:03 +0000</pubDate>
		<dc:creator>Tino Didriksen</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[convert]]></category>
		<category><![CDATA[string]]></category>

		<guid isPermaLink="false">http://tinodidriksen.com/?p=206</guid>
		<description><![CDATA[(There is also an opposite int-to-string performance test.) (Updated 2010-04-15: Re-run with g++ 4.4.1 and VC++ 2010 Express; updated tables to show both ticks and relative factor, instead of just percentage of baseline.) A performance benchmark of which method is faster of converting an std::string to an integer. The goal is ending up with an [...]]]></description>
		<wfw:commentRss>http://tinodidriksen.com/2010/02/16/cpp-convert-string-to-int-speed/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

