<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Python Speed: Getting the first part of a string</title>
	<atom:link href="http://juliank.wordpress.com/2008/03/24/python-speed-getting-the-first-part-of-a-string/feed/" rel="self" type="application/rss+xml" />
	<link>http://juliank.wordpress.com/2008/03/24/python-speed-getting-the-first-part-of-a-string/</link>
	<description>Ubuntu Member &#124; Fellow of the Free Software Foundation Europe &#124; Developer</description>
	<pubDate>Sun, 18 May 2008 10:57:52 +0000</pubDate>
	<generator>http://wordpress.org/?v=MU</generator>
		<item>
		<title>By: elghinn</title>
		<link>http://juliank.wordpress.com/2008/03/24/python-speed-getting-the-first-part-of-a-string/#comment-193</link>
		<dc:creator>elghinn</dc:creator>
		<pubDate>Fri, 02 May 2008 10:17:13 +0000</pubDate>
		<guid isPermaLink="false">http://juliank.wordpress.com/?p=23#comment-193</guid>
		<description>If the string in "a" is a bit different, resultat is different too O:)

In [1]: a = 'ijtgvtrVC/ytrvyvcytv/vcytvcyt'

In [2]: timeit a.split('/', 1)[0]
1000000 loops, best of 3: 847 ns per loop

In [3]: timeit a.split('/')[0]
1000000 loops, best of 3: 850 ns per loop</description>
		<content:encoded><![CDATA[<p>If the string in &#8220;a&#8221; is a bit different, resultat is different too O <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>In [1]: a = &#8216;ijtgvtrVC/ytrvyvcytv/vcytvcyt&#8217;</p>
<p>In [2]: timeit a.split(&#8217;/', 1)[0]<br />
1000000 loops, best of 3: 847 ns per loop</p>
<p>In [3]: timeit a.split(&#8217;/')[0]<br />
1000000 loops, best of 3: 850 ns per loop</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alexandre</title>
		<link>http://juliank.wordpress.com/2008/03/24/python-speed-getting-the-first-part-of-a-string/#comment-136</link>
		<dc:creator>Alexandre</dc:creator>
		<pubDate>Wed, 26 Mar 2008 04:57:05 +0000</pubDate>
		<guid isPermaLink="false">http://juliank.wordpress.com/?p=23#comment-136</guid>
		<description>By the way, I think sequence unpacking is slightly faster than indexing: 

    x, _, _ = a.partition('/')</description>
		<content:encoded><![CDATA[<p>By the way, I think sequence unpacking is slightly faster than indexing: </p>
<p>    x, _, _ = a.partition(&#8217;/')</p>
]]></content:encoded>
	</item>
</channel>
</rss>
