Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #67421

Re: Mac vs. Linux for Python Development

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder5.xlned.com!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.019
X-Spam-Evidence '*H*': 0.96; '*S*': 0.00; 'importing': 0.05; 'interpreter': 0.05; 'say,': 0.05; 'startup': 0.05; 'subject:Python': 0.06; 'cache': 0.07; 'executed': 0.09; 'repeated': 0.09; 'sure,': 0.09; 'worse': 0.09; 'cc:addr:python- list': 0.11; 'assume': 0.14; "wouldn't": 0.14; 'posted': 0.15; 'windows': 0.15; 'decimal.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'seconds.': 0.16; 'stuff.': 0.16; 'so.': 0.16; 'wrote:': 0.18; 'module': 0.19; 'trying': 0.19; 'figures': 0.19; 'slightly': 0.19; 'machine': 0.22; 'import': 0.22; 'cc:addr:python.org': 0.22; 'load': 0.23; 'adds': 0.24; 'switched': 0.24; 'test.': 0.24; 'visible': 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'point': 0.28; 'testing': 0.29; 'compared': 0.30; 'originally': 0.30; 'message- id:@mail.gmail.com': 0.30; "i'm": 0.30; 'decimal': 0.31; 'loading': 0.31; 'though.': 0.31; "we're": 0.32; 'beginning': 0.33; 'maybe': 0.34; 'problem': 0.35; 'something': 0.35; 'case,': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'really': 0.36; 'disk': 0.36; 'done': 0.36; 'seconds': 0.37; 'starting': 0.37; 'server': 0.38; 'awesome': 0.38; 'pm,': 0.38; 'moving': 0.39; 'enough': 0.39; 'major': 0.40; 'how': 0.40; 'even': 0.60; 'warm': 0.60; 'full': 0.61; 'first': 0.61; 'box,': 0.64; 'more': 0.64; 'talking': 0.65; 'effectively': 0.66; 'here': 0.66; 'subject:. ': 0.67; 'between': 0.67; 'close': 0.67; 'mar': 0.68; 'frank': 0.68; 'periodically': 0.68; 'started.': 0.68; 'cold': 0.69; '"most': 0.84; 'exercise.': 0.84; 'ms.': 0.84; 'overall,': 0.84; 'penalty': 0.84; 'suspicion': 0.84; 'steps.': 0.91; 'to:none': 0.92; 'hundred': 0.95; 'subject:Development': 0.95; 'factors': 0.97
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=muQqiVTWoY93XjjfSpoGMKfkzxXfIpIvk0m5XxcWFsk=; b=nBuBz8ByFu2ppoCVM+yDBGgvZeuKOwY+Y8kqzfdpIWLAfjdq2NFeXoB7q9Su4yopNo bW93P2Qwe3/hDBStvw7JzFLbRTByvECwa7fEnPKD/+WnmV0egnAf18g5eD5qo0yL7Mlt q9O5Cwp75r/6CCab4KeGZ1SjeSPLlnygg0la/2JsX7d+RDCuQQ4Igvueyv6nal07HseE 8ctPUzRun3vd8EUHV7+vwNDq3I2qICQMdr40EeDP1rx/A6C2dn+MoA+o3DeGYrRyGgWg usFpgwXOmmWIk6g6BoPJiXQvIpfsNW2HExqAaWMyYy3zwM/XjTuU11kb78Nalw4GUbVu 1V8A==
MIME-Version 1.0
X-Received by 10.66.118.71 with SMTP id kk7mr13419732pab.14.1393754332476; Sun, 02 Mar 2014 01:58:52 -0800 (PST)
In-Reply-To <leumvj$olt$1@ger.gmane.org>
References <2465a8c7-ce0e-4606-ad3b-9135c96e3e4c@googlegroups.com> <4e741358-ce12-40ac-97b8-3bbbf2d6ddca@googlegroups.com> <CAPTjJmrBU9K0aoJyCUmif1FCExtbsuq27pGxiRvyNd=yVn-D5g@mail.gmail.com> <leugs1$68d$1@ger.gmane.org> <CAPTjJmrmJjiGMfqui=PpJco7LjtqVpUjj=XNmTYbYQEmxG3fmw@mail.gmail.com> <leumvj$olt$1@ger.gmane.org>
Date Sun, 2 Mar 2014 20:58:52 +1100
Subject Re: Mac vs. Linux for Python Development
From Chris Angelico <rosuav@gmail.com>
Cc "python-list@python.org" <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.7566.1393754341.18130.python-list@python.org> (permalink)
Lines 44
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1393754341 news.xs4all.nl 2866 [2001:888:2000:d::a6]:55299
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:67421

Show key headers only | View raw


On Sun, Mar 2, 2014 at 6:35 PM, Frank Millman <frank@chagford.com> wrote:
> I assume by 'warm cache' you mean that I had used the decimal module before
> and not switched the machine off before trying the above exercise.
>
> In my case, the machine was switched off before I started. I switched it on
> and executed the above steps.

That would be about it, yeah. So that would be a cold cache test.

> To be slightly more precise, instead of 'the blink of an eye', I estimate it
> was between 250-500 ms. If I close the interpreter and start it up again, it
> takes maybe 100-200ms.

Alright, so now we're talking about some other factors on my system
that slow down the cold cache load dramatically. That I can completely
understand; when I originally posted it, I was fully aware that the
exact figures wouldn't be duplicable. 500ms is a major delay to
startup; but what's really significant is the 100-200ms warm cache,
because that one is what's going to be repeated. (Imagine a web server
that periodically restarts its subprocesses - say, every N requests.
Adding 200ms to startup time effectively adds 200/N ms to every
request.)

An awesome disk cache can improve that immensely, though. My Debian
box, warm cache, takes 0.0 seconds to import decimal. But it's a
faster computer overall, so even cold cache it only takes a hundred ms
or so.

> Just to be sure, I switched the machine off and on again, and repeated the
> exercise. Starting the interpreter for the first time takes 1.5 - 2 seconds.
> Importing decimal for the first time takes less than 500ms.

I'm beginning to get a suspicion here that the Windows XP disk cache
actually might have a "most pessimal" state, where it's full of other
stuff. Worse than a cold cache in performance, a cache warmed by
something else. But in any case, the exact figures for cold cache are
almost immaterial compared to a noticeable warm-cache delay - if
there's enough work to be done just loading the .pyc from the disk
cache that it takes visible time, then it would be a problem to force
that to be loaded on every interpreter startup. Which was kinda the
point of my original testing - I wanted to know how much of a penalty
there'd be to moving decimal to built-in.

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Mac vs. Linux for Python Development twiz <twizansk@gmail.com> - 2014-02-23 00:43 -0800
  Re: Mac vs. Linux for Python Development Chris Angelico <rosuav@gmail.com> - 2014-02-23 19:58 +1100
    Re: Mac vs. Linux for Python Development twiz <twizansk@gmail.com> - 2014-02-23 02:17 -0800
      Re: Mac vs. Linux for Python Development Chris Angelico <rosuav@gmail.com> - 2014-02-23 21:24 +1100
      Re: Mac vs. Linux for Python Development Ned Deily <nad@acm.org> - 2014-02-23 03:49 -0800
  Re: Mac vs. Linux for Python Development Andriy Kornatskyy <andriy.kornatskyy@live.com> - 2014-02-23 11:51 +0200
  Re: Mac vs. Linux for Python Development "Günther Dietrich" <gd.usenet@spamfence.net> - 2014-02-23 12:34 +0100
  Re: Mac vs. Linux for Python Development Dave Cook <davecook@nowhere.net> - 2014-02-24 03:37 +0000
  Re: Mac vs. Linux for Python Development William Ray Wing <wrw@mac.com> - 2014-02-24 10:33 -0500
  Re: Mac vs. Linux for Python Development Michael Torrie <torriem@gmail.com> - 2014-02-24 10:34 -0700
  Re: Mac vs. Linux for Python Development Michael Torrie <torriem@gmail.com> - 2014-02-24 10:42 -0700
  Re: Mac vs. Linux for Python Development Chris Angelico <rosuav@gmail.com> - 2014-02-25 05:37 +1100
    Re: Mac vs. Linux for Python Development Grant Edwards <invalid@invalid.invalid> - 2014-02-24 19:35 +0000
  Re: Mac vs. Linux for Python Development Roy Smith <roy@panix.com> - 2014-02-23 09:20 -0500
  Re: Mac vs. Linux for Python Development "Mark H. Harris" <harrismh777@gmail.com> - 2014-03-01 14:32 -0800
    Re: Mac vs. Linux for Python Development Chris Angelico <rosuav@gmail.com> - 2014-03-02 09:57 +1100
    Re: Mac vs. Linux for Python Development Ned Deily <nad@acm.org> - 2014-03-01 15:07 -0800
    Re: Mac vs. Linux for Python Development "Frank Millman" <frank@chagford.com> - 2014-03-02 07:51 +0200
    Re: Mac vs. Linux for Python Development Chris Angelico <rosuav@gmail.com> - 2014-03-02 17:57 +1100
    Re: Mac vs. Linux for Python Development "Frank Millman" <frank@chagford.com> - 2014-03-02 09:35 +0200
    Re: Mac vs. Linux for Python Development Chris Angelico <rosuav@gmail.com> - 2014-03-02 20:58 +1100

csiph-web