From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Israelsson Tampe Newsgroups: gmane.lisp.guile.devel Subject: Re: A vm for native code in guile Date: Sat, 7 Jul 2012 22:12:30 +0200 Message-ID: References: <87obnxreq5.fsf@pobox.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=14dae9340f1717faf604c44300ff X-Trace: dough.gmane.org 1341691964 1652 80.91.229.3 (7 Jul 2012 20:12:44 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 7 Jul 2012 20:12:44 +0000 (UTC) To: guile-devel Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sat Jul 07 22:12:43 2012 Return-path: Envelope-to: guile-devel@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 1SnbMt-0000Tm-BS for guile-devel@m.gmane.org; Sat, 07 Jul 2012 22:12:39 +0200 Original-Received: from localhost ([::1]:44161 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SnbMs-0004cV-4X for guile-devel@m.gmane.org; Sat, 07 Jul 2012 16:12:38 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:38829) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SnbMp-0004cF-0g for guile-devel@gnu.org; Sat, 07 Jul 2012 16:12:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SnbMn-0000iz-9d for guile-devel@gnu.org; Sat, 07 Jul 2012 16:12:34 -0400 Original-Received: from mail-ob0-f169.google.com ([209.85.214.169]:47663) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SnbMn-0000iO-1h for guile-devel@gnu.org; Sat, 07 Jul 2012 16:12:33 -0400 Original-Received: by obhx4 with SMTP id x4so15122210obh.0 for ; Sat, 07 Jul 2012 13:12:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=2g33G5Z6zgo6jYnZ3Jd+80rPhqEBWENt5nzNFC78vus=; b=TBVM5/NuSKbqhFKlUR1yVsho738eW6EM9XLztV6js1hvjGOapcNn9KOrhUX9YTtE4T V/pWNNf5DnGJcJ8YRHaXA0LckKkun+SKPaMlMt4bwKmJp1g9zactVld4wgeAs7tyznWw j26o6LFtWi5lXt7scjcRHWjPTC8NvRgIm66NeaUk47lpqSYnTY1ANVAaJuW1dFo7YLnG wfWJ6S6ERk/xRGeusOKBplY1ubS9Imh+yySeKq5bsNS18t3HGEIQfTbqt1eymdjYA0vR nPGpuVFD3rOLHb2BtbWjdYDYXHAlhqVApKbbQcLvkp72AQvzqUnqQ/gpmAGOKC/fX465 DW3w== Original-Received: by 10.50.179.101 with SMTP id df5mr5325467igc.22.1341691950266; Sat, 07 Jul 2012 13:12:30 -0700 (PDT) Original-Received: by 10.50.41.196 with HTTP; Sat, 7 Jul 2012 13:12:30 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.214.169 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:14719 Archived-At: --14dae9340f1717faf604c44300ff Content-Type: text/plain; charset=ISO-8859-1 Hi, Branching now works and a big enough subset of the VM is translatable for some interesting benchmarks to be done. So by skipping the goto structure a the win is maybe 3-4x for simple numerical loops. I do expect these loop ta be another factor of 2 when the wip-rtl is translated in the same way. The reason is that the overhead mainly consists of the instructions that move things to and from the cache and rtl seams to decrease the number of such operations. I've been incrementing fixnums and walked some through lists of size 10000 to measure these numbers. One thing to note with that code are that it piggy-packs onto the C-stack and is not working with it's own. I bet that is not optimal but that's what I did and it should mean that it's fast to switch to C-code from the native compiled or jit compiled ones. Have fun! /Stefan --14dae9340f1717faf604c44300ff Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi,

Branching now works and a big enough subset of the VM is transla= table for some interesting
benchmarks to be done.

So by skipping = the goto structure a the win is maybe 3-4x for simple numerical loops. I do= expect
these loop ta be another factor of 2 when the wip-rtl is translated in the = same way. The
reason is that the overhead mainly consists of the instru= ctions that move things to and from the cache and rtl seams to decrease the= number of such operations. I've been incrementing fixnums and walked some through lists of size 10000 to measure these numbers.

One thing= to note with that code are that it piggy-packs onto the C-stack and is not= working with it's own.
I bet that is not optimal but that's wha= t I did and it should mean that it's fast to switch to C-code from the<= br> native compiled or jit compiled ones.

Have fun!
/Stefan
--14dae9340f1717faf604c44300ff--