From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from kankan.nagaokaut.ac.jp (kankan.nagaokaut.ac.jp [133.44.2.24]) by blade.nagaokaut.ac.jp (8.9.3+3.2W/8.9.3/Debian 8.9.3-21) with ESMTP id JAA09212; Mon, 5 Aug 2002 09:58:45 +0900 Received: from tonton.nagaokaut.ac.jp (tonton [133.44.2.115]) by kankan.nagaokaut.ac.jp (8.11.3/8.11.3) with ESMTP id g750wI151679; Mon, 5 Aug 2002 09:58:18 +0900 (JST) (envelope-from ruby-core-admin@ruby-lang.org) Received: (from root@localhost) by tonton.nagaokaut.ac.jp (8.11.3/8.11.3) id g750wIC77159; Mon, 5 Aug 2002 09:58:18 +0900 (JST) (envelope-from ruby-core-admin@ruby-lang.org) Received: from voscc.nagaokaut.ac.jp (voscc.nagaokaut.ac.jp [133.44.1.100]) by tonton.nagaokaut.ac.jp (8.11.3/8.11.3av) with ESMTP id g750wF577152; Mon, 5 Aug 2002 09:58:15 +0900 (JST) (envelope-from ruby-core-admin@ruby-lang.org) Received: from helium.ruby-lang.org (helium.ruby-lang.org [210.251.121.214]) by voscc.nagaokaut.ac.jp (8.12.5/8.12.5) with ESMTP id g750wBa3067810; Mon, 5 Aug 2002 09:58:14 +0900 (JST) (envelope-from ruby-core-admin@ruby-lang.org) Received: from helium.ruby-lang.org (localhost [127.0.0.1]) by helium.ruby-lang.org (Postfix) with ESMTP id 5E5C8147A; Mon, 5 Aug 2002 09:58:11 +0900 (JST) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by helium.ruby-lang.org (Postfix) with SMTP id 53B33127A for ; Mon, 5 Aug 2002 09:58:09 +0900 (JST) Received: (qmail 9145 invoked by uid 0); 5 Aug 2002 00:58:06 -0000 Received: from pd9e386aa.dip.t-dialin.net (HELO lony) (217.227.134.170) by mail.gmx.net (mp007-rz3) with SMTP; 5 Aug 2002 00:58:06 -0000 Date: Mon, 5 Aug 2002 09:58:11 +0900 Posted: Mon, 5 Aug 2002 02:55:50 +0200 From: "Christoph" Reply-To: ruby-core@ruby-lang.org Subject: RE: A truth? patch + benchmarks To: Message-Id: <000001c23c1a$d864b4d0$0100a8c0@lony> In-Reply-To: <1028368241.225394.25167.nullmailer@picachu.netlab.jp> X-ML-Name: ruby-core X-Mail-Count: 00294 X-MLServer: fml [fml 3.0pl#17]; post only (only members can post) X-ML-Info: If you have a question, send e-mail with the body "help" (without quotes) to the address ruby-core-ctl@ruby-lang.org; help= X-Mailer: Microsoft Outlook, Build 10.0.3416 X-Priority: 3 (Normal) X-MSMail-Priority: Normal Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Precedence: bulk X-Virus-Scanned: by AMaViS perl-10 > From: Yukihiro Matsumoto ... > |> Unfortunately, there's no bit available for all objects. All flag > |> bits are used to represent NODEs' line number. > | > |To bad ... but maybe we might see something like it in 2.0? (or > |even better body smatter cooks something up for the current > |development line - maybe only replace the RTEST calls in the > |crucial IF_NODE, WHILE_NODE ... part?) > > If it is really efficient, I think we can reserve a bit ot two for One bit should be enough. My tests indicate that for the current Implementation this would have been efficient, but I obviously can only guess, how this or a similar scheme, would fair in an interpreter rewrite. > it. But I want to know the secret of this magic. Actually, I am not quite sure to what ``magic'' you are referring to (which only seems fair, since my emails are usually incomprehensible;-). If the ``magic'' is referring to my observed speedup of replacing most RTEST macro calls with an inlined function call (at least on my windows machine this effect seems to be real), I really have to pass (besides making uneducated guesses) but I tend to think that this "compilation optimization artifact" is wedded to the current implementation (putting things in perspective, changing from VC6 to VC7 has an even bigger impact on speed). Just been curious (and pushy;-). I counted 26 ``T_VALUES'' in ruby.h, so from my naive point of view it might be possible (after rearranging the ``T_VALUES'' a bit, eehm, <= 31) to free up the sixth bit as a false/true bit. Of course, I tried this and did not see any obvious ill effect (running ``make test'' and ``rubicon'' on cygwin) - I guess that's what they call wishful thinking;-). My question is, what did I overlook this time? /Christoph