Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder7.xlned.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'python,': 0.02; 'cc:addr :python-list': 0.11; '-tkc': 0.16; 'csv': 0.16; 'enough.': 0.16; 'from:addr:python.list': 0.16; 'from:addr:tim.thechases.com': 0.16; 'from:name:tim chase': 0.16; 'notably': 0.16; 'subject:There': 0.16; 'to:addr:python.list': 0.16; 'to:addr:tim.thechases.com': 0.16; 'to:name:tim chase': 0.16; 'underlying': 0.16; 'wrote:': 0.18; 'module': 0.19; 'written': 0.21; 'cc:addr:python.org': 0.22; 'cc:2**1': 0.23; 'cc:no real name:2**0': 0.24; "i've": 0.25; 'header:In-Reply-To:1': 0.27; 'tim': 0.29; 'chase': 0.31; 'subject: (': 0.35; 'but': 0.35; 'shows': 0.36; 'charset:us-ascii': 0.36; 'should': 0.36; 'rather': 0.38; 'little': 0.38; 'does': 0.39; 'more': 0.64; 'believe': 0.68; 'faster.': 0.84; 'received:50.22': 0.84 Date: Tue, 23 Apr 2013 10:02:55 -0500 From: Tim Chase To: Tim Chase Subject: Re: There must be a better way (correction) In-Reply-To: <20130423093005.41ec8199@bigbox.christie.dr> References: <51732d81$0$29977$c3e8da3$5496439d@news.astraweb.com> <20130420193422.25255e98@bigbox.christie.dr> <20130423093005.41ec8199@bigbox.christie.dr> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.20.1; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - boston.accountservergroup.com X-AntiAbuse: Original Domain - python.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tim.thechases.com Cc: python-list@python.org, Neil Cerutti X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 15 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1366729285 news.xs4all.nl 2218 [2001:888:2000:d::a6]:39552 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:44187 On 2013-04-23 09:30, Tim Chase wrote: > > But a csv.DictReader might still be more efficient. I never > > tested. This is the only place I've used this "optimization". > > It's fast enough. ;) > > I believe the csv module does all the work at c-level, rather than > as pure Python, so it should be notably faster. A little digging shows that csv.DictReader is pure Python, using the underlying _csv.reader which is written in C for speed. -tkc