From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.devel Subject: Re: data-crunching in guile Date: Fri, 26 Jun 2009 16:37:58 +0200 Message-ID: References: <86r5x891t1.fsf@gnu.org> <87y6rgszfw.fsf@arudy.ossau.uklinux.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1246027156 6845 80.91.229.12 (26 Jun 2009 14:39:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 26 Jun 2009 14:39:16 +0000 (UTC) Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= , guile-devel@gnu.org To: Neil Jerram Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Jun 26 16:39:09 2009 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 1MKCa5-0005IK-3Q for guile-devel@m.gmane.org; Fri, 26 Jun 2009 16:39:09 +0200 Original-Received: from localhost ([127.0.0.1]:56561 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MKCa4-00019W-Hw for guile-devel@m.gmane.org; Fri, 26 Jun 2009 10:39:08 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MKCa1-000190-IR for guile-devel@gnu.org; Fri, 26 Jun 2009 10:39:05 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MKCZx-00018L-SF for guile-devel@gnu.org; Fri, 26 Jun 2009 10:39:05 -0400 Original-Received: from [199.232.76.173] (port=47120 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MKCZx-00018I-QD for guile-devel@gnu.org; Fri, 26 Jun 2009 10:39:01 -0400 Original-Received: from mx20.gnu.org ([199.232.41.8]:59556) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MKCZt-0007Rk-SH; Fri, 26 Jun 2009 10:38:58 -0400 Original-Received: from a-sasl-quonix.sasl.smtp.pobox.com ([208.72.237.25] helo=sasl.smtp.pobox.com) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MKCZs-0001cZ-59; Fri, 26 Jun 2009 10:38:56 -0400 Original-Received: from localhost.localdomain (unknown [127.0.0.1]) by a-sasl-quonix.sasl.smtp.pobox.com (Postfix) with ESMTP id EEFD123959; Fri, 26 Jun 2009 10:37:50 -0400 (EDT) Original-Received: from unquote (unknown [83.44.189.188]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-sasl-quonix.sasl.smtp.pobox.com (Postfix) with ESMTPSA id F21AF23958; Fri, 26 Jun 2009 10:37:45 -0400 (EDT) In-Reply-To: <87y6rgszfw.fsf@arudy.ossau.uklinux.net> (Neil Jerram's message of "Thu, 25 Jun 2009 23:47:47 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (gnu/linux) X-Pobox-Relay-ID: ECF5A9C8-625E-11DE-87EA-DC021A496417-02397024!a-sasl-quonix.pobox.com X-Detected-Operating-System: by mx20.gnu.org: Solaris 10 (beta) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) 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:8774 Archived-At: Hi Neil! On Fri 26 Jun 2009 00:47, Neil Jerram writes: > Andy Wingo writes: > >> I don't have Neil's mail open here, but my thought was this: getting a >> fast VM is a dark art of feeling and instinct, My feeling is that a VM >> is fast if it fits in the CPU's cache: the instruction cache and the >> data cache. The data cache means that smaller code is better, hence my >> resistance to word-sized instructions. The instruction cache means that >> the VM itself should be small -- but if the code for vector ops is all >> "at the end" of the VM, then only code that uses vector ops pays for the >> increased "cache footprint" of the VM. > > Thanks, I see now. But presumably even VM code will frequently call > out to primitives all over libguile, won't it? Over time, I'd say no. I see functions written in C migrating over to be written in Scheme, like PLT did recently with `map'. We should port srfi-1 back to Scheme I think :) Not to mention silly things like string-any being in boot-9... There's no reason for Scheme to be slow. Of course, this is the "over time" view, currently we're not there... And yet, disassemble the functions that you use regularly, and often you find they just use VM ops, and don't call out to primitives. That shows that the VM is, while virtual, still quite a good machine for computation. > I completely agree that small code size can be important for > performance, but I doubt that it is the size of the VM on its own that > matters. Depends on what percent of time is spent in the VM. On previous profiling runs, this was 30-60% of program run time -- well worth optimizing. Cheers, Andy -- http://wingolog.org/