From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: nalaginrut Newsgroups: gmane.lisp.guile.bugs Subject: bug#12033: closed (Re: bug#12033: format should be faster) Date: Thu, 23 Aug 2012 11:23:56 +0800 Organization: HFG Message-ID: <1345692236.5141.79.camel@Renee-SUSE.suse> References: <878vd9i651.fsf@gnu.org> <1343023866.4060.12.camel@Renee-SUSE.suse> <87boi5gpg0.fsf@gnu.org> <1345517459.5141.62.camel@Renee-SUSE.suse> <87ipccqxvq.fsf@gnu.org> <87vcgcdoml.fsf@pobox.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1345692289 10705 80.91.229.3 (23 Aug 2012 03:24:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 23 Aug 2012 03:24:49 +0000 (UTC) Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= , 12033@debbugs.gnu.org To: Andy Wingo Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Thu Aug 23 05:24:49 2012 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1T4O2H-0004K8-FE for guile-bugs@m.gmane.org; Thu, 23 Aug 2012 05:24:45 +0200 Original-Received: from localhost ([::1]:36459 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4O2F-0007gN-DO for guile-bugs@m.gmane.org; Wed, 22 Aug 2012 23:24:43 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:51575) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4O29-0007gB-4a for bug-guile@gnu.org; Wed, 22 Aug 2012 23:24:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T4O26-00068K-Vd for bug-guile@gnu.org; Wed, 22 Aug 2012 23:24:36 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34583) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4O26-00068G-RO for bug-guile@gnu.org; Wed, 22 Aug 2012 23:24:34 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1T4O2Y-0002nI-GL for bug-guile@gnu.org; Wed, 22 Aug 2012 23:25:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: nalaginrut Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-guile@gnu.org Resent-Date: Thu, 23 Aug 2012 03:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12033 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 12033-submit@debbugs.gnu.org id=B12033.134569227510704 (code B ref 12033); Thu, 23 Aug 2012 03:25:02 +0000 Original-Received: (at 12033) by debbugs.gnu.org; 23 Aug 2012 03:24:35 +0000 Original-Received: from localhost ([127.0.0.1]:44129 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T4O25-0002ma-TZ for submit@debbugs.gnu.org; Wed, 22 Aug 2012 23:24:34 -0400 Original-Received: from mail-wi0-f180.google.com ([209.85.212.180]:56852) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T4O23-0002mS-Ui for 12033@debbugs.gnu.org; Wed, 22 Aug 2012 23:24:32 -0400 Original-Received: by wibhm6 with SMTP id hm6so275289wib.15 for <12033@debbugs.gnu.org>; Wed, 22 Aug 2012 20:24:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:subject:from:to:cc:date:in-reply-to:references :organization:content-type:x-mailer:content-transfer-encoding :mime-version; bh=DcNgNw1fBznlCVM12tr/WmlxPAG1Fv0d+9ia6WLh/E8=; b=EaH6JXvJv1yfY0oa0c3vPbyLtAaauBCNXjOvzW6HxslZ0EFz/nTAN60G1w89KxfVDp jk0LfnWmqBtQMKym1hVrUgcXflPnT6eB6EIxxOHLV4OgNw3nMSFAaZGoeAnJN64g/15w /ONKoLcfl/BX2L9YGGRyuXSmixOx5vTjmIhWccR2DWyAFgu5KQ3+nMfNDSEeS5SFuRCX ggnMLcmyXW/aFt1IzPfOT9RGpmC10uODcUgh9Zr6kHtbSU7iI+rK1KGI5e3wJcWGQi7x vCdh0bxjjBfl8FRoxVO7/OUceMl0o/T1HfRJEfrkr+0GdrpxazQlNaNyMZgCnkU5rJop a0mw== Original-Received: by 10.180.79.229 with SMTP id m5mr220835wix.13.1345692242790; Wed, 22 Aug 2012 20:24:02 -0700 (PDT) Original-Received: from [147.2.147.112] ([61.14.130.226]) by mx.google.com with ESMTPS id dc3sm42496671wib.7.2012.08.22.20.23.59 (version=SSLv3 cipher=OTHER); Wed, 22 Aug 2012 20:24:02 -0700 (PDT) In-Reply-To: <87vcgcdoml.fsf@pobox.com> X-Mailer: Evolution 3.2.3 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:6503 Archived-At: hey guys! Any conclusion? On Tue, 2012-08-21 at 21:35 +0200, Andy Wingo wrote: > On Tue 21 Aug 2012 13:37, ludo@gnu.org (Ludovic Courtès) writes: > > >> It seems clear that in this case, Guile "should" know how to dispatch > >> on the format string just once, outside of the loop, instead of doing > >> it in every iteration. > > > > I think Andy would say: “inline cache!”. :-) > > :-) > > There are lots of possibilities here. You could "compile" a format > string into a closure, and save it in a hash table. You could compile > it to Scheme and then compile that procedure. You could recognize some > common degenerate cases. > > Dunno! In this case I would compile the string into a closure. Seems > pretty cheap and it would kill the dispatch overhead. > > Andy