<story><title>It Can Happen to You</title><url>https://www.mattkeeter.com/blog/2021-03-01-happen/</url></story><parent_chain><item><author>mkeeter</author><text>Blog author here!  Thanks to HN for warning me about sscanf at &lt;i&gt;exactly&lt;/i&gt; the right time – within a day of me trying to load some ASCII STLs and noticing it was slow...&lt;p&gt;Linked deep in the Twitter replies [1], there&amp;#x27;s an open glibc issue about this, dating back to 2014:&lt;p&gt;&lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;sourceware.org&amp;#x2F;bugzilla&amp;#x2F;show_bug.cgi?id=17577&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;sourceware.org&amp;#x2F;bugzilla&amp;#x2F;show_bug.cgi?id=17577&lt;/a&gt;&lt;p&gt;C doesn&amp;#x27;t have any &lt;i&gt;requirements&lt;/i&gt; on the complexity of sscanf, so it might not be a bug per se, but it&amp;#x27;s certainly... a pitfall.&lt;p&gt;[1] &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;twitter.com&amp;#x2F;impraxical&amp;#x2F;status&amp;#x2F;1367194430835425283&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;twitter.com&amp;#x2F;impraxical&amp;#x2F;status&amp;#x2F;1367194430835425283&lt;/a&gt;</text></item></parent_chain><comment><author>Waterluvian</author><text>I love the format of this blog post. Perfect length. Perfect detail. You don&amp;#x27;t waste words. A good number of images.</text></comment>
<story><title>It Can Happen to You</title><url>https://www.mattkeeter.com/blog/2021-03-01-happen/</url></story><parent_chain><item><author>mkeeter</author><text>Blog author here!  Thanks to HN for warning me about sscanf at &lt;i&gt;exactly&lt;/i&gt; the right time – within a day of me trying to load some ASCII STLs and noticing it was slow...&lt;p&gt;Linked deep in the Twitter replies [1], there&amp;#x27;s an open glibc issue about this, dating back to 2014:&lt;p&gt;&lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;sourceware.org&amp;#x2F;bugzilla&amp;#x2F;show_bug.cgi?id=17577&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;sourceware.org&amp;#x2F;bugzilla&amp;#x2F;show_bug.cgi?id=17577&lt;/a&gt;&lt;p&gt;C doesn&amp;#x27;t have any &lt;i&gt;requirements&lt;/i&gt; on the complexity of sscanf, so it might not be a bug per se, but it&amp;#x27;s certainly... a pitfall.&lt;p&gt;[1] &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;twitter.com&amp;#x2F;impraxical&amp;#x2F;status&amp;#x2F;1367194430835425283&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;twitter.com&amp;#x2F;impraxical&amp;#x2F;status&amp;#x2F;1367194430835425283&lt;/a&gt;</text></item></parent_chain><comment><author>BenFrantzDale</author><text>IMO the lack of a complexity requirement is a bug in the C standard. And really it’s a bug in the implementation(s?) too. If it can be done on O(1), shame on library authors for doing it in O(n). If you want programmers to trust library authors, don’t do this to us. Maybe std::from_chars FTW?</text></comment>