Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Stephen Hansen Newsgroups: comp.lang.python Subject: Re: Fastest way to retrieve and write html contents to file Date: Sun, 01 May 2016 22:00:32 -0700 Lines: 27 Message-ID: References: <1462163671.1159335.595256017.204863FE@webmail.messagingengine.com> <1462165232.1164853.595266801.5DB17C45@webmail.messagingengine.com> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de +rcwTxHXeruCM41fEfUP0wg/cbIdEUGTuaO7zhiV35pg== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'method.': 0.05; 'subject:file': 0.07; 'meaningful': 0.09; 'received:internal': 0.09; 'second.': 0.09; 'python': 0.10; 'python.': 0.11; '0.2': 0.16; '2016': 0.16; 'dfs': 0.16; 'loops': 0.16; 'message- id:@webmail.messagingengine.com': 0.16; 'pathological': 0.16; 'received:10.202': 0.16; 'received:10.202.2': 0.16; 'received:66.111': 0.16; 'received:66.111.4': 0.16; 'received:io': 0.16; 'received:messagingengine.com': 0.16; 'received:psf.io': 0.16; 'wrote:': 0.16; 'language': 0.19; '>>>': 0.20; 'stephen': 0.22; 'am,': 0.23; 'header:In-Reply-To:1': 0.24; 'mon,': 0.24; 'chris': 0.26; 'disk': 0.27; 'you?': 0.30; 'operations.': 0.33; 'something': 0.35; 'asking': 0.35; "isn't": 0.35; 'but': 0.36; 'there': 0.36; 'to:addr:python-list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'really': 0.37; 'two': 0.37; "won't": 0.38; 'received:66': 0.38; 'enough': 0.39; 'to:addr:python.org': 0.40; 'skip:u 10': 0.61; 'header:Message- Id:1': 0.61; 'chrisa': 0.84; 'difference.': 0.84; 'subject:write': 0.84; 'timings': 0.84; 'lot,': 0.95 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=ixokai.io; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=JOovwuvMkPIzHdgD2Nw4xLSuC6g=; b=c5pXX4 PA0k0Bi5jHC+ZNG6zhFu01XBr4rOfawtuPv8lphkni3bDicVQMr9sBrQNx9/Y3xn eJ8HDmqCIhVcJNerAy0/qhjimIdWpwvvgZEqkPtkPkOU92qcL9oGykrRNn3sOgrK 5VEsvzSJf2uwun2fF9ZZ6eRM3+dnXd3V2sT5Y= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=JOovwuvMkPIzHdg D2Nw4xLSuC6g=; b=L5W2ivS7mPZCCZEwTUTrEPPu4iMWDzKrS/x1+72o8aViSN5 +58dijJwGrdIfHCPfei0Ahl08Xum+QMz0GslEUcg3kj1Vwc+LuISLUtqvonWLVY6 QgSyLeiHi8EJNrJUbhqDGgwAYsz15ExD823fo9OYrsJRBmlbcNdfyTreC/O0= X-Sasl-Enc: GRDJUtpZDvmfBpJruYXrFe8AmoUU+orME/yRIQGFumGB 1462165232 X-Mailer: MessagingEngine.com Webmail Interface - ajax-491eb5a4 In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <1462165232.1164853.595266801.5DB17C45@webmail.messagingengine.com> X-Mailman-Original-References: <1462163671.1159335.595256017.204863FE@webmail.messagingengine.com> Xref: csiph.com comp.lang.python:107975 On Sun, May 1, 2016, at 09:50 PM, DFS wrote: > On 5/2/2016 12:40 AM, Chris Angelico wrote: > > On Mon, May 2, 2016 at 2:34 PM, Stephen Hansen wrote: > >> On Sun, May 1, 2016, at 09:06 PM, DFS wrote: > >>> Then I tested them in loops - the VBScript is MUCH faster: 0.44 for 10 > >>> iterations, vs 0.88 for python. > >> ... > >>> I know it's asking a lot, but is there a really fast AND really short > >>> python solution for this simple thing? > >> > >> 0.88 is not fast enough for you? That's less then a second. > > > > Also, this is timings of network and disk operations. Unless something > > pathological is happening, the language used won't make any > > difference. > > > > ChrisA > > > Unfortunately, the VBScript is twice as fast as any python method. And 0.2 is twice as fast as 0.1. When you have two small numbers, 'twice as fast' isn't particularly meaningful as a metric. -- Stephen Hansen m e @ i x o k a i . i o