Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Dennis Lee Bieber Newsgroups: comp.lang.python Subject: Re: The Cost of Dynamism (was Re: Pyhon 2.x or 3.x, which is faster?) Date: Thu, 24 Mar 2016 09:33:01 -0400 Organization: IISS Elusive Unicorn Lines: 41 Message-ID: References: <56ef9787$0$1516$c3e8da3$5496439d@news.astraweb.com> <56f02196$0$1588$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de TbjOiDdMzFaN+37kGgleyw98aJUWWsXjt+ePDsHTObXw== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'compiler': 0.05; 'cpython': 0.05; 'x86': 0.07; '16-bit': 0.09; 'message- id:@4ax.com': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'specifying': 0.09; 'subject:which': 0.09; 'worse': 0.09; 'x86,': 0.09; 'python': 0.10; '(but': 0.15; 'file,': 0.15; 'thu,': 0.15; '"ironpython"': 0.16; '(java': 0.16; '2016': 0.16; 'boundaries,': 0.16; 'focus,': 0.16; 'forth.': 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'segment': 0.16; 'subject:?)': 0.16; 'variations': 0.16; 'memory': 0.17; 'comparing': 0.18; 'compilation': 0.18; 'processor': 0.18; "shouldn't": 0.18; 'url:home': 0.18; 'language': 0.19; 'load': 0.20; '(not': 0.20; 'machine': 0.21; '(the': 0.22; 'arm': 0.22; 'minor': 0.22; 'pascal': 0.22; 'trying': 0.22; '(or': 0.23; 'seems': 0.23; 'module': 0.25; 'header:X-Complaints-To:1': 0.26; 'updating': 0.27; 'specify': 0.27; 'initial': 0.28; 'closer': 0.29; 'comparison': 0.29; 'exclude': 0.29; 'once,': 0.29; 'releases,': 0.29; 'code': 0.30; 'operations': 0.31; 'implement': 0.32; 'maybe': 0.33; 'builds': 0.33; 'changing': 0.34; 'file': 0.34; 'something': 0.35; 'level': 0.35; 'but': 0.36; 'needed': 0.36; 'basic': 0.36; 'faster': 0.36; 'totally': 0.36; 'visual': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'charset:us-ascii': 0.37; 'things': 0.38; 'virtual': 0.38; 'version': 0.38; 'files': 0.38; 'or,': 0.38; 'means': 0.39; 'why': 0.39; 'does': 0.39; 'to:addr:python.org': 0.40; 'your': 0.60; 'subject:The': 0.61; 'address': 0.61; 'discuss': 0.61; 'different': 0.63; 'within': 0.64; 'between': 0.65; 'mar': 0.65; '..net': 0.84; '>of': 0.84; 'streamlining': 0.84; 'timings': 0.84; 'dennis': 0.91; 'received:108': 0.93 X-Injected-Via-Gmane: http://gmane.org/ X-Gmane-NNTP-Posting-Host: adsl-108-73-117-233.dsl.klmzmi.sbcglobal.net X-Newsreader: Forte Agent 6.00/32.1186 X-No-Archive: YES X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:105608 On Thu, 24 Mar 2016 13:01:54 +0000, BartC declaimed the following: > >And forgetting Python for a minute and concentrating only on its >byte-code as a language in its own right, how would you go about the job >of streamlining it? > Given that the "byte-code" likely does change between major version releases, and maybe even minor version (but not on builds within a minor version)... Which is why pyc files may need to be regenerated when updating a Python interpreter... AND that the "Jython" and "IronPython" variations are on totally different run-times (Java virtual machine and .NET as I recall), unless you specify the base CPython (not to be confused with Cython), any comparison is likely meaningless. It is on par with trying to discuss the byte-codes of BASIC without specifying QuickBASIC, GWBASIC, Visual BASIC (though that is closer to a full native compiler for v6, and .NET for later)... Or worse -- the byte-code of the P4 Pascal compiler (or UCSD) vs the threaded code of FORTH. As for the timings -- do you exclude the initial compilation phase (stuff things into a module and create a pyc file from that... Or, since speed seems your focus, create pyo files -- then time the use of the pyo file, not the source). From what I can tell -- your focus is at the level of comparing single operations between x86, 68K, and ARM processors, and objecting because one does something faster so shouldn't the others implement the operation the same way -- even if it means changing half the support architecture. (The original x86 segment registers may have made large memory operations slower, as one had to load both segment and offset registers... But made 64K code position independent on 16-byte boundaries, as one only had to load the segment register once, and henceforth only needed to work with a 16-bit offset register -- vs a 68K processor that had to load the full address register [24 to 32 bits] each time even on a 16-bit bus) -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/