<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>C&#43;&#43; on Posts about Software Development</title>
    <link>https://siedentop.dev/tags/c&#43;&#43;/</link>
    <description>Recent content in C&#43;&#43; on Posts about Software Development</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Wed, 21 Oct 2020 01:59:35 -0700</lastBuildDate>
    <atom:link href="https://siedentop.dev/tags/c++/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Optimizing C&#43;&#43; Word Count</title>
      <link>https://siedentop.dev/posts/cpp-word-count/</link>
      <pubDate>Wed, 21 Oct 2020 01:59:35 -0700</pubDate>
      <guid>https://siedentop.dev/posts/cpp-word-count/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://siedentop.dev/posts/swift-word-count&#34;&gt;Yesterday&amp;rsquo;s post&lt;/a&gt; showed that the original C++ version is around 13 times&#xA;slower than my non-optimized &lt;a href=&#34;https://siedentop.dev/posts/rust-reputation&#34;&gt;Rust version&lt;/a&gt;. Next, I&amp;rsquo;ll show how to get&#xA;easily equivalent performance to Rust.&lt;/p&gt;&#xA;&lt;p&gt;One problem that I immediately made out when first seeing the C++ version is&#xA;that it uses &lt;code&gt;std::regex&lt;/code&gt;. &lt;code&gt;std::regex&lt;/code&gt; is known to be horribly slow &lt;sup id=&#34;fnref:1&#34;&gt;&lt;a href=&#34;#fn:1&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;1&lt;/a&gt;&lt;/sup&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Just replacing the checking of the file name extension with the in-built&#xA;&lt;code&gt;e.path().extension() != &amp;quot;.txt&amp;quot;&lt;/code&gt; speeds up from 373 ms to 52ms!&lt;/p&gt;</description>
    </item>
    <item>
      <title>Sentry and C&#43;&#43;</title>
      <link>https://siedentop.dev/posts/sentry-cpp/</link>
      <pubDate>Sat, 13 Jun 2020 23:08:35 -0700</pubDate>
      <guid>https://siedentop.dev/posts/sentry-cpp/</guid>
      <description>&lt;h1 id=&#34;crash-reporting&#34;&gt;Crash Reporting&lt;/h1&gt;&#xA;&lt;p&gt;If your program is running on more than one machine or is used by others, you&#xA;probably want to get some insight into when things fail. I believe this is&#xA;commonly called &lt;a href=&#34;https://en.wikipedia.org/wiki/Crash_reporter&#34;&gt;&amp;ldquo;Crash Reporting&amp;rdquo;&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Such a crash reporting system will consist of a component to collect individual&#xA;incidents and of a component to aggregate individual reports. For example, it&#xA;will group common incidents by stack trace.&lt;/p&gt;&#xA;&lt;p&gt;One public example of this, is Mozilla&amp;rsquo;s system (&lt;em&gt;Socorro&lt;/em&gt;). Have a look &lt;a href=&#34;https://crash-stats.mozilla.org/&#34;&gt;here&#xA;for statistics&lt;/a&gt; on all of Mozilla&amp;rsquo;s projects. Or here, for just the &lt;a href=&#34;https://crash-stats.mozilla.org/topcrashers/?product=Firefox&amp;amp;version=79.0a1&#34;&gt;top ten&#xA;Firefox crashes&lt;/a&gt; from a specific version:&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
