Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsreader4.netcologne.de!news.netcologne.de!feeder1.cambriumusenet.nl!feed.tweaknews.nl!194.109.133.81.MISMATCH!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!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.010 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'alain': 0.09; 'counting': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'api': 0.11; 'python': 0.11; 'gui': 0.12; 'language.': 0.14; 'mostly': 0.14; 'exactly,': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'wrote:': 0.18; 'written': 0.21; 'header:User-Agent:1': 0.23; 'typical': 0.24; 'header:X -Complaints-To:1': 0.27; 'thus': 0.29; 'program,': 0.31; 'cases': 0.33; 'framework': 0.33; 'screen': 0.34; 'but': 0.35; 'doing': 0.36; 'whatever': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'even': 0.60; 'most': 0.60; 'wall': 0.65; 'subject:This': 0.74; 'battery': 0.84; 'calls,': 0.84; 'lighting': 0.84; 'swift': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Sturla Molden Subject: Re: OT: This Swift thing Date: Thu, 5 Jun 2014 23:02:53 +0000 (UTC) References: <87lhtbhxhx.fsf@dpt-info.u-strasbg.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: 109-130-11.connect.netcom.no User-Agent: NewsTap/4.0.1 (iPad) X-: 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: 19 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1402009393 news.xs4all.nl 2880 [2001:888:2000:d::a6]:57823 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:72783 Alain Ketterlin wrote: >> And that's counting only CPU time. If you count wall time, your >> typical Python program spends most of its time deep inside kernel API >> calls, waiting for the user or I/O or something. > > But this is true of any IO-bound program, whatever the language. Exactly, this is true even with Swift. The Swift and the Python program would spend most of the time doing the same thing (idle processing). Thus a GUI program written in Python would not exhaust the battery faster than a program written in Swift. In both cases, the majority of the wall time is spent inside the kernel waiting for some UI event (keyboard, mouse, whatever). And in both cases the battery is spent lighting up a screen that is mostly static. And in both bases the graphics displayed on the screen is generated inside some UI framework written in Objective-C. Sturla