<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Python-Hate on Insignificant Bits</title>
    <link>https://bobcopeland.com/blog/tags/python-hate/</link>
    <description>Recent content in Python-Hate on Insignificant Bits</description>
    <generator>Hugo</generator>
    <language>en-US</language>
    <lastBuildDate>Fri, 30 Mar 2012 11:53:47 +0000</lastBuildDate>
    <atom:link href="https://bobcopeland.com/blog/tags/python-hate/feed.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Orders of magnitude</title>
      <link>https://bobcopeland.com/blog/2012/03/orders-of-magnitude/</link>
      <pubDate>Fri, 30 Mar 2012 11:53:47 +0000</pubDate>
       <guid isPermaLink="false">http://bobcopeland.com/blog/?p=1811</guid> 
      <description>&lt;p&gt;I had a Hadoop map-reduce job that kept timing out, which led to this interesting discovery:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ time ./json-parser-test.py
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;real	0m0.205s
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;user	0m0.152s
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sys	0m0.032s
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ time ./json-parser-test-no-speedups.py
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;real	0m2.069s
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;user	0m2.044s
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sys	0m0.024s
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ time jython ./json-parser-test-no-speedups.py
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;real	79m59.785s
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;user	80m23.709s
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sys	0m14.441s
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Moral: use Java-based JSON libraries if you have to use Jython and JSON. Also, Java sucks.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Even C has tsearch</title>
      <link>https://bobcopeland.com/blog/2011/03/even-c-has-tsearch/</link>
      <pubDate>Tue, 29 Mar 2011 03:51:26 +0000</pubDate>
       <guid isPermaLink="false">http://bobcopeland.com/blog/?p=1586</guid> 
      <description>&lt;p&gt;I&amp;rsquo;m just going on record to state that the two reasons I&amp;rsquo;ve seen on the net for lack of tree-based collections in the Python standard library &amp;ndash; (1) that they have bad locality ( &lt;em&gt;gee, very unlike huge memory-hogging randomized hash tables, oh and just try scanning one of those&amp;hellip;&lt;/em&gt;), and (2) that Python makes it so simple to write your own, just do that! ( &lt;em&gt;well, yes I can and have, but hey it&amp;rsquo;s 2011 already, rbtrees are like 40 years old!&lt;/em&gt;) -- are inane.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
