From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.bugs Subject: bug#24102: Use guile variable objects as SRFI-111 boxes. Date: Wed, 31 Aug 2016 11:03:05 +0200 Message-ID: <87wpixjoom.fsf@pobox.com> References: <87pop6uk9r.fsf@netris.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1472634265 32352 195.159.176.226 (31 Aug 2016 09:04:25 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 31 Aug 2016 09:04:25 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) Cc: 24102@debbugs.gnu.org, Glenn Michaels To: Mark H Weaver Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Wed Aug 31 11:04:20 2016 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bf1RS-0007me-L0 for guile-bugs@m.gmane.org; Wed, 31 Aug 2016 11:04:18 +0200 Original-Received: from localhost ([::1]:52991 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bf1RQ-00079X-Az for guile-bugs@m.gmane.org; Wed, 31 Aug 2016 05:04:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34713) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bf1RI-00078G-Bu for bug-guile@gnu.org; Wed, 31 Aug 2016 05:04:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bf1RC-0005cz-DP for bug-guile@gnu.org; Wed, 31 Aug 2016 05:04:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:47234) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bf1RC-0005cv-AT for bug-guile@gnu.org; Wed, 31 Aug 2016 05:04:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bf1RC-0003bo-4O for bug-guile@gnu.org; Wed, 31 Aug 2016 05:04:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andy Wingo Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Wed, 31 Aug 2016 09:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24102 X-GNU-PR-Package: guile X-GNU-PR-Keywords: patch Original-Received: via spool by 24102-submit@debbugs.gnu.org id=B24102.147263419913818 (code B ref 24102); Wed, 31 Aug 2016 09:04:02 +0000 Original-Received: (at 24102) by debbugs.gnu.org; 31 Aug 2016 09:03:19 +0000 Original-Received: from localhost ([127.0.0.1]:44946 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bf1QV-0003ao-4N for submit@debbugs.gnu.org; Wed, 31 Aug 2016 05:03:19 -0400 Original-Received: from pb-sasl2.pobox.com ([64.147.108.67]:58541 helo=sasl.smtp.pobox.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bf1QT-0003ag-Gy for 24102@debbugs.gnu.org; Wed, 31 Aug 2016 05:03:17 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl2.pobox.com (Postfix) with ESMTP id 2A08D348E9; Wed, 31 Aug 2016 05:03:16 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=gkedl1/78qmBFRBfCkWrvv7+ftg=; b=b5S8M1 /lfQ7J+5/L6GLYzpWIsSk7xbtesUBsfjJOM33zwTzqKVk7ORs1tR1RNW4WuTiz6M +UrXN3IXxaN04TPKnj5GX8C3bC4KLbR7yObC8sFM8HOr9z9ptI15yPOtF7ZT96PQ U+Bbf8DJnrCDjE11DF+acY46kh8IBID9t9Cys= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=Pb552nxPqD1yGvBxofNNyLSOdXgzOVsK hz4WY+9VpobGJ8+J6brDd7VfedDDetHCMD+J3XFQ++kPU7Wd3VpFajbWhUMS0ByN 8ne5uzZ8285kY6SaW/qabG+e4pkcaNBk2cczFRiK+0IEcxRzmQ9rtuPX20vDFizf UEDgqXUeags= Original-Received: from pb-sasl2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-sasl2.pobox.com (Postfix) with ESMTP id 2026C348E8; Wed, 31 Aug 2016 05:03:16 -0400 (EDT) Original-Received: from clucks (unknown [88.160.190.192]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pb-sasl2.pobox.com (Postfix) with ESMTPSA id ABB96348E6; Wed, 31 Aug 2016 05:03:12 -0400 (EDT) In-Reply-To: <87pop6uk9r.fsf@netris.org> (Mark H. Weaver's message of "Thu, 18 Aug 2016 12:14:24 -0400") X-Pobox-Relay-ID: BEFB9130-6F59-11E6-A79A-0CE5F1301B6D-02397024!pb-sasl2.pobox.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.lisp.guile.bugs:8390 Archived-At: On Thu 18 Aug 2016 18:14, Mark H Weaver writes: > As I wrote above, the current guile compiler can already do this kind of > type inference, although it does not currently do this for boxes. > we can already anticipate having native code generation in the > next couple of years, and we must keep boxes semantically simple so that > our future compiler will be able to generate good code for this very > important fundamental type. For what it's worth, I don't see the optimization argument as weighing very heavily on this discussion. I would rather have fewer fundamental data types rather than more, in the next two years or so. I see the mid-term result here being that SRFI-111 boxes are much slower than variables. The highest performance compilation tier we can imagine would include adaptive optimization, and when it runs you can know that the variables that a bit of code uses are bound or not. Also in that case we can reasonably make any call to variable-unset! deoptimize any code that uses variables, forcing it to reoptimize later. Since variable-unset! is quite rare this is no big deal I think. Andy