<?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>c++ &#8211; Harry Jackson</title>
	<atom:link href="http://127.0.0.1:8090/tag/c/feed" rel="self" type="application/rss+xml" />
	<link>http://127.0.0.1:8090</link>
	<description>Parent, Painter, Programmer</description>
	<lastBuildDate>Thu, 13 May 2004 06:55:45 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1</generator>
	<item>
		<title>Word Parser in C++</title>
		<link>http://127.0.0.1:8090/word_parser_in_c.htm</link>
					<comments>http://127.0.0.1:8090/word_parser_in_c.htm#respond</comments>
		
		<dc:creator><![CDATA[harry]]></dc:creator>
		<pubDate>Thu, 13 May 2004 06:55:45 +0000</pubDate>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[parser]]></category>
		<guid isPermaLink="false">http://www.hjackson.org/wp/?p=104</guid>

					<description><![CDATA[I have been writing a word parser in C++ for a while now and noticed two things that had quite a distinct affect on performance. I was storing the words in a &#8220;map&#8221; which is a standard associative container. I knew I should have been using a hash_map but unfortunately when writing the parser I &#8230; <p class="link-more"><a href="http://127.0.0.1:8090/word_parser_in_c.htm" class="more-link">Continue reading<span class="screen-reader-text"> "Word Parser in C++"</span></a></p>]]></description>
										<content:encoded><![CDATA[<p>I have been writing a word parser in C++ for a while now and noticed two things that had quite a distinct affect on performance. I was storing the words in a &#8220;map&#8221; which is a standard associative container. I knew I should have been using a hash_map but unfortunately when writing the parser I had access to a minimal Borland library on a windows box so hash_map was out of the question.<br />
When I got home however and back on the Linux box I had a poke around and discovered &#8220;ext/hash_map&#8221; which is not officially part of the C++ standard but its widely used and so in my eyes ok.<br />
This change had a marked improvement as the word list grew to just over a few thousand. Having a word list in excess of a few hundred thousand meant that it had a vast improvement in performance.<br />
Another improvement was the way I was reading files into a single string object then parsing the string for its words. I was originally using &#8220;getline&#8221; and appending the string but this is slow even if you reserve space for the string.<br />
If you are looking for a<br />
<a href="http://cpptips.hyperformix.com/cpptips/file_into_str2"> faster more elegant way to read a file into a string look no further</a></p>
]]></content:encoded>
					
					<wfw:commentRss>http://127.0.0.1:8090/word_parser_in_c.htm/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
