Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #73674
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <ian.g.kelly@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.012 |
| X-Spam-Evidence | '*H*': 0.98; '*S*': 0.00; 'lawrence': 0.09; 'measure': 0.09; '10:05': 0.16; 'contest.': 0.16; 'count,': 0.16; 'finish.': 0.16; 'measured': 0.16; 'statement.': 0.16; 'string:': 0.16; 'thread?': 0.16; 'wrote:': 0.18; 'module': 0.19; 'separate': 0.22; 'print': 0.22; 'skip': 0.24; 'logging': 0.26; 'header:In- Reply-To:1': 0.27; 'am,': 0.29; "doesn't": 0.30; 'compared': 0.30; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'code': 0.31; 'doc': 0.31; 'fri,': 0.33; 'raw': 0.33; 'actual': 0.34; 'created': 0.35; 'something': 0.35; 'received:google.com': 0.35; 'instances': 0.36; 'to:addr:python-list': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'simple': 0.61; 'delegate': 0.68; 'expectations': 0.74 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=u5eb/LkcPXrabFX8F1Oiyxms0ztOnJ0kcaH0j7GNvW4=; b=m4EfzNXf1LMcXLOfGrDO1UjN3/9lEaT7iQTO5eRwr88R2q+nXvJ5icWNkYvdf2lIUM LlMnS609IQtYyMy9qEnUtvKvzbdahhgV1qtp+obDo0wGeXx0GH4hZmqE6+uBi4hR6smE kNZ+zm4IA9zl5DXPwf6KccGbnt8sgPmfUH9sDcN/sou9Hckh5vZzKsWIPTX/hfKYWE7n FKIe7v/MoSGvzeDMmg9tesAr1cWo4lqsiMKSQEORDPp6r8hbEJBn7vppAssk46k9XiTo bmvG8CmB/3C7DOfrX+V+M/88y8gFlXeEpQMy4hkSjiSD+ipI18XMAfBhkVf3270IT2+7 ph2A== |
| X-Received | by 10.67.13.134 with SMTP id ey6mr34223933pad.44.1403904978363; Fri, 27 Jun 2014 14:36:18 -0700 (PDT) |
| MIME-Version | 1.0 |
| In-Reply-To | <CANc-5UxS9O=yPphCGzr=cbX-_SLTKLq28FbxwC2FVwLPrbqXqw@mail.gmail.com> |
| References | <d5d8cea5-c4c9-42c4-865f-9efe33b162ed@googlegroups.com> <mailman.11266.1403810884.18130.python-list@python.org> <d1dbc61a-ed09-4a10-b4d5-deb40cb54430@googlegroups.com> <53acdd24$0$29985$c3e8da3$5496439d@news.astraweb.com> <lok45f$45v$1@ger.gmane.org> <CANc-5UxS9O=yPphCGzr=cbX-_SLTKLq28FbxwC2FVwLPrbqXqw@mail.gmail.com> |
| From | Ian Kelly <ian.g.kelly@gmail.com> |
| Date | Fri, 27 Jun 2014 15:35:38 -0600 |
| Subject | Re: print statements and profiling a function slowed performance |
| To | Python <python-list@python.org> |
| Content-Type | text/plain; charset=UTF-8 |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.11294.1403904986.18130.python-list@python.org> (permalink) |
| Lines | 15 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1403904986 news.xs4all.nl 2885 [2001:888:2000:d::a6]:52018 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:73674 |
Show key headers only | View raw
On Fri, Jun 27, 2014 at 10:05 AM, Skip Montanaro <skip@pobox.com> wrote: > On Fri, Jun 27, 2014 at 10:55 AM, Mark Lawrence <breamoreboy@yahoo.co.uk> wrote: >> Expectations don't count, measure it :) > > It's no contest. I have measured it (ages ago). The logging module > does so many things that it's impossible for it to ever be as fast as > a simple print statement. Look at the code in LogRecord.__init__. Then > note the doc string: > > ... LogRecord instances are created every time something is logged. ... While I'm not disputing your measurement, doesn't the logging module delegate the actual I/O to a separate thread? That's got to count for something, compared to a raw print that has to wait for the I/O to finish.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
print statements and profiling a function slowed performance CM <cmpython@gmail.com> - 2014-06-26 11:44 -0700
Re: print statements and profiling a function slowed performance Michael Torrie <torriem@gmail.com> - 2014-06-26 13:14 -0600
Re: print statements and profiling a function slowed performance CM <cmpython@gmail.com> - 2014-06-26 13:36 -0700
Re: print statements and profiling a function slowed performance Chris Angelico <rosuav@gmail.com> - 2014-06-27 12:06 +1000
Re: print statements and profiling a function slowed performance Michael Torrie <torriem@gmail.com> - 2014-06-26 19:59 -0600
Re: print statements and profiling a function slowed performance Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-06-28 09:41 -0400
Re: print statements and profiling a function slowed performance Chris Angelico <rosuav@gmail.com> - 2014-06-28 23:50 +1000
Re: print statements and profiling a function slowed performance Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-06-29 02:14 -0400
Re: print statements and profiling a function slowed performance Chris Angelico <rosuav@gmail.com> - 2014-06-29 17:14 +1000
Re: print statements and profiling a function slowed performance Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-06-26 20:27 +0100
Re: print statements and profiling a function slowed performance CM <cmpython@gmail.com> - 2014-06-26 13:37 -0700
Re: print statements and profiling a function slowed performance Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-06-27 02:55 +0000
Re: print statements and profiling a function slowed performance Chris Angelico <rosuav@gmail.com> - 2014-06-27 13:14 +1000
Re: print statements and profiling a function slowed performance Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-06-27 16:55 +0100
Re: print statements and profiling a function slowed performance Skip Montanaro <skip@pobox.com> - 2014-06-27 11:05 -0500
Re: print statements and profiling a function slowed performance Ian Kelly <ian.g.kelly@gmail.com> - 2014-06-27 15:35 -0600
Re: print statements and profiling a function slowed performance Skip Montanaro <skip@pobox.com> - 2014-06-27 19:12 -0500
Re: print statements and profiling a function slowed performance Chris Angelico <rosuav@gmail.com> - 2014-06-28 10:29 +1000
Re: print statements and profiling a function slowed performance Marko Rauhamaa <marko@pacujo.net> - 2014-06-28 22:20 +0300
Re: print statements and profiling a function slowed performance Chris Angelico <rosuav@gmail.com> - 2014-06-29 09:30 +1000
Re: print statements and profiling a function slowed performance Rustom Mody <rustompmody@gmail.com> - 2014-06-28 19:25 -0700
Re: print statements and profiling a function slowed performance Chris Angelico <rosuav@gmail.com> - 2014-06-29 12:32 +1000
Re: print statements and profiling a function slowed performance Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-06-28 02:06 +0100
Re: print statements and profiling a function slowed performance Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-06-26 22:11 -0400
csiph-web