Received: from mail.proteosys.com ([213.139.130.197]) by nummer-3.proteosys with Microsoft SMTPSVC(6.0.3790.3959); Fri, 27 Nov 2009 17:00:13 +0100 Received: by mail.proteosys.com (8.14.3/8.14.3) with ESMTP id nARG0BcH006063 for ; Fri, 27 Nov 2009 17:00:12 +0100 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.100.94]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id nARFutFN002485 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 27 Nov 2009 16:56:56 +0100 Received: from listserv.uni-heidelberg.de (localhost.localdomain [127.0.0.1]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id nARDV79S024182; Fri, 27 Nov 2009 16:56:47 +0100 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 15.5) with spool id 354470 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Fri, 27 Nov 2009 16:56:46 +0100 Received: from relay.uni-heidelberg.de (relay.uni-heidelberg.de [129.206.100.212]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id nARFukeC016493 for ; Fri, 27 Nov 2009 16:56:46 +0100 Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.17.8]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id nARFug3p009116 for ; Fri, 27 Nov 2009 16:56:45 +0100 Received: from morse.mittelbach-online.de (p54A87A66.dip.t-dialin.net [84.168.122.102]) by mrelayeu.kundenserver.de (node=mrbap2) with ESMTP (Nemesis) id 0Lm6Wf-1NmpuC3JQ1-00ZYld; Fri, 27 Nov 2009 16:56:42 +0100 Received: by morse.mittelbach-online.de (Postfix, from userid 501) id DE4F46EE96; Fri, 27 Nov 2009 16:56:38 +0100 (CET) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 References: <19209.8773.325233.396932@morse.mittelbach-online.de> <4B0C694B.1080803@residenset.net> <4B0E8600.6000003@residenset.net> X-Mailer: VM 7.19 under Emacs 21.3.1 X-Provags-ID: V01U2FsdGVkX18sgfcQaCyEfSBe7SR+/RdE8Nk1yuIPHs6LD+j MDip8PQypIReSsWgVsYY39JJdWygRsyldKfNEXIUtFgmupiHk8 1XjoZtRPKkqImVrEyNauw== X-Spam-Whitelist-Provider: Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by listserv.uni-heidelberg.de id nARFukeC016494 Message-ID: <19215.63158.760427.5070@morse.mittelbach-online.de> Date: Fri, 27 Nov 2009 16:56:38 +0100 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Frank Mittelbach Subject: Re: object type / instance arguments To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE In-Reply-To: <4B0E8600.6000003@residenset.net> Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-ProteoSys-SPAM-Score: -106.599 () BAYES_00,RCVD_IN_DNSWL_MED,USER_IN_WHITELIST X-Scanned-By: MIMEDefang 2.65 on 213.139.130.197 Return-Path: owner-latex-l@LISTSERV.UNI-HEIDELBERG.DE X-OriginalArrivalTime: 27 Nov 2009 16:00:13.0526 (UTC) FILETIME=[B44F2760:01CA6F7A] Status: R X-Status: X-Keywords: X-UID: 6188 Lars Hellström writes: > > Re: efficiency: My experience is that one can have TeX do quite > > extensive processing without slowing things down much *provided one does > > it in the mouth*. (I don't understand quite why that would be, but did > > some timing to confirm it in particular cases for fontinst v1.913.) the "inner loop" of TeX's processing is indeed extremely fast (and particuarily designed to be so). But most of Tex's processing is optimized for speed so that I found that for arbitrary code a rough but workable estimate is to look at the number of lines produced by doing tracing. I found that this is more or less linear to processing speed, e.g. a typical mix of 100 lines of expansions and executing primitives is about 20 times slower than code generating five tracing lines > Following up on that: As a proof of concept, I implemented (for > TeX3/LaTeX2e) such a \DictGet command last night; see attached files > (<6K with source documentation and tests). Complexity is linear in the > size of dictionary values, but worst-case quadratic in the average size > of a key. helpful for playing around and checking alternatives, thanks. As to the approach you outlined, I wonder if we should go in this direction. I find it a bit dangerous if processing the dictionary is likely to result in expansion of the values. I mean, if I want to use a value I essentially have to run it through a full expansion as it is unknown after how many expansions \DictGet would return the value. For that reason it seems to me better if one implements something like \dict_get:nnnN { } { } { } so that the "value" is in but without expansion, ie essentially like the way property lists work. The tl variable can then be used in other places without requiring exessive expansion. This way one can avoid the "moving argument" issue that we all know from 2e. code for this should be still fairly fast as one could harvest the code for plists but without the overhead needed on updating key/values Or am I missing something? frank