From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/64631 Path: news.gmane.org!not-for-mail From: Philipp Gesang Newsgroups: gmane.comp.tex.context Subject: Re: why lua? Date: Sat, 18 Dec 2010 15:17:26 +0100 Message-ID: <20101218141726.GD18627@aides> References: <20101217232724.GA17742@aides> <4D0BF64D.1090406@wxs.nl> <20101218110322.GB17742@aides> <4D0C9C8A.7060602@wxs.nl> <20101218130620.GC18627@aides> <4D0CB52E.2040305@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0703232689==" X-Trace: dough.gmane.org 1292681866 25392 80.91.229.12 (18 Dec 2010 14:17:46 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 18 Dec 2010 14:17:46 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sat Dec 18 15:17:42 2010 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PTxbR-0000lv-Jd for gctc-ntg-context-518@m.gmane.org; Sat, 18 Dec 2010 15:17:41 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 79A3FCA946; Sat, 18 Dec 2010 15:17:40 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id fXhWycv6wdTK; Sat, 18 Dec 2010 15:17:36 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 3939FCA93D; Sat, 18 Dec 2010 15:17:36 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 7ECCCCA93D for ; Sat, 18 Dec 2010 15:17:34 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id aMI-54bvcC1x for ; Sat, 18 Dec 2010 15:17:32 +0100 (CET) Original-Received: from filter7-ams.mf.surf.net (filter7-ams.mf.surf.net [192.87.102.75]) by balder.ntg.nl (Postfix) with ESMTP id 0CC2ACA937 for ; Sat, 18 Dec 2010 15:17:32 +0100 (CET) Original-Received: from relay2.uni-heidelberg.de (relay2.uni-heidelberg.de [129.206.210.211]) by filter7-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id oBIEHTAc006107 for ; Sat, 18 Dec 2010 15:17:30 +0100 Original-Received: from ix.urz.uni-heidelberg.de (cyrus-portal.urz.uni-heidelberg.de [129.206.100.176]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id oBIEHSK7000406 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 18 Dec 2010 15:17:28 +0100 Original-Received: from extmail.urz.uni-heidelberg.de (extmail.urz.uni-heidelberg.de [129.206.100.140]) by ix.urz.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id oBIEHSOI016483 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 18 Dec 2010 15:17:28 +0100 Original-Received: from localhost (mnhm-4d01089e.pool.mediaWays.net [77.1.8.158]) (authenticated bits=0) by extmail.urz.uni-heidelberg.de (8.13.4/8.13.1) with ESMTP id oBIEHQY3011155 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Sat, 18 Dec 2010 15:17:27 +0100 In-Reply-To: <4D0CB52E.2040305@wxs.nl> X-Operating-System: Linux aides 2.6.36-ARCH X-Polite-Request: "Please try to be nice, don't send html mail." User-Agent: Mutt/1.5.20 (2009-06-14) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=129.206.210.211; country=DE; region=01; city=Heidelberg; latitude=49.4167; longitude=8.7000; http://maps.google.com/maps?q=49.4167,8.7000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0DDIChtrT - bbe8ef63ec2c - 20101218 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.75 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:64631 Archived-At: --===============0703232689== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8w3uRX/HFJGApMzv" Content-Disposition: inline --8w3uRX/HFJGApMzv Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2010-12-18 <14:20:46>, Hans Hagen wrote: > On 18-12-2010 2:06, Philipp Gesang wrote: >=20 > >What always baffled me is that in the manual Roberto advertises > >ipairs() as the iterator of choice (at least in the v.5.0 doc). > >Compared to the other options using it is just, well, erratic. >=20 > I did lots of testing (an doptimizing) in critical code but in > practice one will not notice much difference in a mkiv run. > Actually, I changed all pairs, ipairs as there was a temporary > intention to remove them from the lua core. >=20 > btw, in for i=3D1,#t do ... the #t is also a function call (so having My fault, I just forgot about that; with the array size stored in a local variable the =E2=80=9Cfor=E2=80=9D loop is faster than =E2=80=9Cwhi= le=E2=80=9D, as expected. > many in these t[#t+1] =3D ... cases is also slower but again, seldom > noticeable as lua in general is so fast =E2=80=A6 when adding to an array the =E2=80=9Ct[#t+1] =3D elm=E2=80=9D app= roach turns out to be still faster than table.insert() which, again, is advertised in the manual. Even python=E2=80=99s append() method is faster than table.insert() and that means a lot. Philipp --=20 () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments --8w3uRX/HFJGApMzv Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk0MwnYACgkQ02lYlJYWs9IlWgCgl8nHcFRgmcKoy5iU/2Wnkwjy hEQAoJvB0nb//JMIS3SxbtUX1zeRBQBL =sEDA -----END PGP SIGNATURE----- --8w3uRX/HFJGApMzv-- --===============0703232689== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ --===============0703232689==--