From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Julian Graham" Newsgroups: gmane.lisp.guile.devel Subject: Re: pass at srfi-89 implementation Date: Mon, 28 Jul 2008 00:19:21 -0400 Message-ID: <2bc5f8210807272119r2102e523ocd115e538a525d40@mail.gmail.com> References: <2bc5f8210805022037t73e3e30ay835ad4814e308397@mail.gmail.com> <87od72gidl.fsf@gnu.org> <2bc5f8210805191328o33656ab2ue07daf5f372c6610@mail.gmail.com> <87ve198hxr.fsf@gnu.org> <2bc5f8210805242208q503c33bfj96cb1f1a8fb2594d@mail.gmail.com> <87lk1w19aw.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1217218779 7897 80.91.229.12 (28 Jul 2008 04:19:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 28 Jul 2008 04:19:39 +0000 (UTC) Cc: guile-devel@gnu.org To: "=?ISO-8859-1?Q?Ludovic_Court=E8s?=" Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Jul 28 06:20:28 2008 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KNKDj-00076B-Nz for guile-devel@m.gmane.org; Mon, 28 Jul 2008 06:20:28 +0200 Original-Received: from localhost ([127.0.0.1]:59543 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KNKCp-0001cP-J1 for guile-devel@m.gmane.org; Mon, 28 Jul 2008 00:19:31 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KNKCj-0001ba-Oh for guile-devel@gnu.org; Mon, 28 Jul 2008 00:19:25 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KNKCi-0001aJ-2L for guile-devel@gnu.org; Mon, 28 Jul 2008 00:19:25 -0400 Original-Received: from [199.232.76.173] (port=52732 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KNKCh-0001aC-MT for guile-devel@gnu.org; Mon, 28 Jul 2008 00:19:23 -0400 Original-Received: from ug-out-1314.google.com ([66.249.92.169]:24268) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KNKCh-0004QN-46 for guile-devel@gnu.org; Mon, 28 Jul 2008 00:19:23 -0400 Original-Received: by ug-out-1314.google.com with SMTP id l31so143594ugc.48 for ; Sun, 27 Jul 2008 21:19:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=b+JZ6V+0reQDKLwaC1h2nx/d+MagCAwroXIL5kwPiK0=; b=ebdJK5IVbb2KtQo60/upg4yaA97Atjp5nNjFx49gl4GnuOiN655GwNa/pSbE/kPb7/ TEG0l6hi7n0THLfH46eQPv4qDV42CirbshouEXzxklubj4dEfZgHcdFhLuVSX7/RPDWs QwSl6lmA3SYZ/9y0h8AjnG3W5l6wtcbc0fGeQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=d40w9ilJceR8mu44Hd7/1KRw1AbyhwLzN8Cu6t4uerAQty6w9Kth0dVrBBWnNFstLa 5+/NHASU2HHD8Gnw9GQxgDUi4x4UAFHLCzOAR1mUImdWboxqEUVxPdYA1BIFg2lTxFsP hg7BOs7/u/c6Ubd7xrlSZtegtDwC3IpT5UdKY= Original-Received: by 10.67.24.11 with SMTP id b11mr1740841ugj.35.1217218761205; Sun, 27 Jul 2008 21:19:21 -0700 (PDT) Original-Received: by 10.66.237.3 with HTTP; Sun, 27 Jul 2008 21:19:21 -0700 (PDT) In-Reply-To: <87lk1w19aw.fsf@gnu.org> Content-Disposition: inline X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:7401 Archived-At: > I'm still not convinced by the last option. Given the above, Option 2 > (that is, writing our own, preferably in Scheme) seems to be the safest. > Hopefully this isn't too much work, but the above quote indicates that > we should be careful about performance. ;-) > > Would you like to try doing it? [Time passes.] Okay, I've tried -- at length. And so far I haven't been able to top the performance of the reference implementation. In fact, it actually seems to be fairly efficient (I now think Marc's quote above about Gambit's built-in support says less about the relative shortcomings of his particular implementation and more about the benefits of doing something like this in native code). From what I can see, there are only a few areas in which the reference implementation could be improved by Guile-specific features: * Native hash tables (Marc's code has its own hash table implementation) * Use of `hashq-get-handle' (the reference implementation relies on the identity of an `undefined' object) * Symbol generation for naming run-time helper functions (the reference implementation explicitly exports bindings for helper functions) So it looks like the right way to go might be to tweak Marc's implementation so that it takes advantage of the above, although I don't see it improving the performance all that much. Alternatively, we could do this in C, but I don't know if it's worth the added complexity. Thoughts? Regards, Julian