From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: No Itisnt Newsgroups: gmane.lisp.guile.devel Subject: Compiler optimizations and Guile's module system Date: Fri, 4 Jun 2010 02:25:03 -0500 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1275636324 8968 80.91.229.12 (4 Jun 2010 07:25:24 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 4 Jun 2010 07:25:24 +0000 (UTC) To: guile-devel Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Jun 04 09:25:23 2010 connect(): No such file or directory 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.69) (envelope-from ) id 1OKRHM-0002Yc-Je for guile-devel@m.gmane.org; Fri, 04 Jun 2010 09:25:20 +0200 Original-Received: from localhost ([127.0.0.1]:50399 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OKRHL-000580-Vd for guile-devel@m.gmane.org; Fri, 04 Jun 2010 03:25:19 -0400 Original-Received: from [140.186.70.92] (port=42425 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OKRHB-00057d-MM for guile-devel@gnu.org; Fri, 04 Jun 2010 03:25:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OKRH6-0002aF-NW for guile-devel@gnu.org; Fri, 04 Jun 2010 03:25:09 -0400 Original-Received: from mail-vw0-f41.google.com ([209.85.212.41]:38022) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OKRH6-0002a9-Kt for guile-devel@gnu.org; Fri, 04 Jun 2010 03:25:04 -0400 Original-Received: by vws13 with SMTP id 13so1500584vws.0 for ; Fri, 04 Jun 2010 00:25:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=kf8cfK3XcSJfzCgCPSyYoqnmKzIpMzN/UNEgz7DWTdQ=; b=BF8cWcc8k1aJ0OtbsLT4o+QhZiYf2aZfJOj+HC0OW2knaqAEtZQMb9HG4Ycn0UaajQ Z9KbGNJ9UIAQDgQYleYT2WLmCS7OBumSfrVcx6XjnE7bcK/xSWJYS5PPyapnEeckgTeJ HssfA9DyeZ7TUdReia7qU06dhCB5pQ0Qx2vH8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=PgMHOBVG2DCoP5WEIHY3S2ElBARrE1F19apsx5zhoNByHSh3zvrjoHxOfx+9oT+7Cy QlCX2EIH9JjVP1NGCAJDyu5tBj/3ykRaz7i4H11LWaFmolKewsr/MK3IKiDu19cJZUIG 3L9qNQB1cdZbqmQ89MYuIoImmRcnm5U42xgeM= Original-Received: by 10.229.190.14 with SMTP id dg14mr2385490qcb.49.1275636303932; Fri, 04 Jun 2010 00:25:03 -0700 (PDT) Original-Received: by 10.229.232.199 with HTTP; Fri, 4 Jun 2010 00:25:03 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/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:10435 Archived-At: I was thinking about inlining, contant propagation, and that class of optimizations recently. Wouldn't Guile's module system (specifically, module-set!) interfere with doing these optimizations on module-level bindings? If a binding is inlined, propagated, etcetera, and the binding was set! by another module, then behavior could vary based on whether the binding was optimized or not. (Bonus whine: Guile currently does this with primitives like +) Off the top of my head, R6RS makes all imported bindings immutable. How often are cross-module set!s used in Guile? Maybe exported bindings could be made immutable by default, and the module definition would explicitly name variables that should be mutable by external code, so the compiler knows not to optimize them. Correct me if I'm wrong here, I've never dealt with this in practice so I'm just musing out loud.