From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Dr. Arne Babenhauserheide" Newsgroups: gmane.lisp.guile.devel Subject: FWD: Test reader speed of Guile 3.0.6 in Lilypond Date: Thu, 18 Mar 2021 09:30:43 +0100 Message-ID: <87czvwj230.fsf@web.de> References: <878s6vaa7c.fsf@web.de> <87v99wf1n0.fsf@web.de> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27449"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.4.15; emacs 27.1 To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Thu Mar 18 09:31:28 2021 Return-path: Envelope-to: guile-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lMo40-00072B-02 for guile-devel@m.gmane-mx.org; Thu, 18 Mar 2021 09:31:28 +0100 Original-Received: from localhost ([::1]:59780 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lMo3z-0002DA-1w for guile-devel@m.gmane-mx.org; Thu, 18 Mar 2021 04:31:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54656) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMo3N-0002Cz-Bn for guile-devel@gnu.org; Thu, 18 Mar 2021 04:30:50 -0400 Original-Received: from mout.web.de ([212.227.15.14]:49957) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMo3L-0002UA-Au for guile-devel@gnu.org; Thu, 18 Mar 2021 04:30:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1616056245; bh=+Bths0PIkbw1suiBPZeycz2U1S2RZSOuh6WKxgfF68E=; h=X-UI-Sender-Class:References:From:To:Subject:Date; b=PJsORg+dNhuRCmlsDIOiWW2stDKUTpYNp2lLRZA/oc7Rmx5VdbLXeDSfP9XterRFu WUbOdjwqLI/blItQWCACoChkk+VXdYEIJxliasOgdrAXzooFaVHd3fXg/LSZBoX08s JTMhK8xkAb105OgJVJs2p4K9gOJd3xtVwb2jjRfA= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Original-Received: from fluss ([84.149.81.26]) by smtp.web.de (mrweb003 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MDg8k-1lTzZr18fu-00H5Cd; Thu, 18 Mar 2021 09:30:45 +0100 X-Provags-ID: V03:K1:/a1Xz2LqPtu1Es8h7/HHfnqqzI9auLVXG6F2n6lXb49LB1rFA0K 8oTfYAB92JAPyJpo70Xo5Wu6B27J2EHtTzaJQEtbMNispOcilW6lIWzhuRneYp+b0VDbyna pn5LDWtfXVI1kgA4s4DFOgK4GuNirW6P8Krpm4mL3mzIwuEslB9luT0+6BG74pTZ5kIFB/2 RnsYSDfhLBYUQReY5RzIA== X-UI-Out-Filterresults: notjunk:1;V03:K0:+xOrJcKKgWo=:xHe5LU7qSVRN0LPWripin4 cT5hWjbCw+uM5tvXvLjS0Y2/96lbVhdabb7gUv3sOlmqV8fC4KDssXiatVjaFCT2iL7n3v88d W+n2QO5P3b9RTKV7VkXhv+NPHQ1/D4fFPSo/kB2hfekue3S07RfkqvDjNYAif7L4iQqAJa7sF THMI3ohUkJnMTiHzP7VDmNGxgaWBDiLHQvrJZ4lFM7nNowHKyvbpNj27elKbUExALo8C4vI+/ 3Wla15q7wdgX9qznd2CON0sC+TlNxOnZG90WavgEtdL3cjwN/5bT6TgpbKx4TAy/OIhtEGhZy gdTpfp76nc7xqbUwoKkbXDTxxTqLA8jeCGWOj+Xl14cl/5l+3QueiMGk/Gdb/aDtW+WULoWpP XMfjxsD0Vu+Sh1cC9oNuDgsr5wjd7hI9rI+E3sCse3Q2yr7qOwDMjqLxj059k1ow7vX7rYyR7 1QwBWa2iucSfQ4gZe659nywgx3gTtZmHO5eLX1I/CBmg66SxOpSKm1xWePPwQ3wGJ7GMfse5V BhFp1UL7ivskgR1dtNu07mepiSUfWSnQzIVqtiw5G6mICFjXKB7pdBDUQC6NBG8hI5J2J2YWG 93D8WDb0FzVl+h9mldU0xZ5bmk5OLDiZLKCdKlzl3isq7gGtObvtpCgWbGMvqzOBXZ6NL0bmF 615VvNoLkHa9b2aguAAztIhtQGF68Ljaj12WI4nz2f8mi2aosZ1QTcsCRETHIEBdn1YmJtin7 yua/wjEo70QIGD/xfKXvkYIARTIjQzqTFWicT5L/PAnoD25+Qt171lp6PL2MMARxryp7jfWV Received-SPF: pass client-ip=212.227.15.14; envelope-from=arne_bab@web.de; helo=mout.web.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "guile-devel" Xref: news.gmane.io gmane.lisp.guile.devel:20709 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, due to the reader-rewrite, I asked in the lilypond-list for testing, because they are likely the strongest power-user of the reader. Han-Wen Nienhuys checked performance in the benchmark suite: > $ cat ../bench.ly > #(define (microseconds) > (let* ((t (gettimeofday)) > (us (/ (cdr t) 1000000.0))) > (+ (car t) us))) > > #(define start (microseconds)) > > % \include "bench-largeexp.ly" > \include "bench-manysmall.ly" > > #(newline) > #(display (- (microseconds) start)) > > Parsing & evaluating '(1 2 3) 200 times. > - guile 1.8: 1.25ms > - guile 2.2: 3.2ms > - guile 3.0.6: 2.08ms > > Parsing & evaluating the giant expression in define-grobs.scm once: > > - guile 1.8: 10.6ms > - guile 2.2: 166ms > - guile 3.0.6: 71ms > > Parsing & evaluating the giant expression in define-grobs.scm once > (but quoted, ie. not real evaluation): > > - guile 1.8: 10.0ms > - guile 2.2: 13ms > - guile 3.0.6: 12.8ms > > In summary, the read speed itself for large expressions is on the same > order as 1.8, but for many small expressions (which is a much more > common use-case) there is still a 60% slowdown. >> asking here because I want to avoid surprising and avoidable changes >> that block Lilypond. I consider Lilypond to be the most important >> flagship project of Guile, and I want to do what I can to prevent >> unnecessary friction. > I appreciate the heads up you gave here today, but from our side, it > doesn't seem like the Guile project is much concerned with our needs. > The evaluation speed of GUILE 3.x is still pretty poor. Having fast, > JIT'ed code seems interesting in theory, but the way it's implemented > in Guile 3.x is a giant headache: the separate byte compilation is > extremely slow, and it is hard to manage (where should the .go files > be stored/installed, how/when are they generated etc.). It also > doesn't match our use case, because a lot of the code that we have > comes from .ly files, so it cannot be precompiled. Are there ways to improve this? For example sticking to the baseline compiler (as described in the wingolog: https://wingolog.org/archives/2020/06/03/a-baseline-compiler-for-guile ) >> The article linked above shows that setting -O1 as optimization of the >> code could help (if you=E2=80=99re not already doing that). > The article gives a pointer to the code, which is > module/language/tree-il/compile-bytecode.scm. I ran >=20 > for c in $(git log module/language/tree-il/compile-bytecode.scm|grep > commit|awk '{print $2;}'); do git show $c ; done | grep -i doc >=20 > to look for documentation, but couldn't find it. The module has one > exported symbol, which is compile-bytecode. >=20 > Could you give some practical tips on how we'd use this? Can someone help with this? It would be pretty cool if there were a simple way to speed-up lilypond like changing optimization level that just got lost in communication (or missing docs). Best wishes, Arne =2D-=20 Unpolitisch sein hei=C3=9Ft politisch sein ohne es zu merken --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJEBAEBCAAuFiEE801qEjXQSQPNItXAE++NRSQDw+sFAmBTD7QQHGFybmVfYmFi QHdlYi5kZQAKCRAT741FJAPD65QMEACkkVUp7JNKcBn3AdYUnih0T8wxHIpTwvIc saJ+cHJpF/ZW0EgUdpDwnQZ599vb7cIBEaWl6EqfLYq4ViOLFEvk/FUy2c/ujLVt VfTCzCNvrVvnqk+uOPEKbLliVgJ+G2zSo4ZOyKWH9APBIMsd3ic9UL9l7fyH6Msx lLFJCEr+3zMbP++Jj6G2bKFGjj/D4ATHe8cOtkP4VCsG0f31V1ak8r801sCQAYpE acegnx9U0wWMO71GoKBQg/FlD/s7vI+qZp7/hWHcifzQyntsFD4ub62Nfz3RdxcN i9ctPOCmXg7uLuif+tza//XL+aisbrjqANWxy+gnX/sqvkOp9kYx0iZQv2OmhqMR YFyQ+W9Ybs29NOsqmVZ8GI4yYgd1eowHK3L4TDo4s19mMXKg87buCkEQbtlzogxl yP96ZJA4GVuZV4MRsBvZyATWLIHUEsX6Xj4dnML/DV2GLex6tMUUkmz44Klwn4oF nDUDuEUnNad1pEfW4GJczN19ZIuemIP29tK6e544TJKLWGjE0caQ4zvbpedmPQ52 cjqbNnp8pzy9dZncxdc4iyXT0oVdk4iGSrprGGMGO8eCBkgQEdOpdphFbWXh5rLi exO7VdgNijZvapOBNRudzZHVmo4HffjzqlnRdUUvUXhBJDuhaYc9THgip2qaYWLX EFbxOGo01IjEBAEBCAAuFiEE3Si95tmHXKvOSosd3M8NswvBBUgFAmBTD7QQHGFy bmVfYmFiQHdlYi5kZQAKCRDczw2zC8EFSMMTA/wL5b7NYAkA8J4Go7QU/xwI1B+m Kou1PtTEGu1mgI3bIQRN9mEZqgXsWdYJC4oG4NY4Jxk/+D5RN0XtUeWPklpXlIcr sGlpYNU5RNQVTXZaTStbY1wvfQ+9kFCVQT6X/s5Sk+9X8Hv+sOqHt80IoTDVtDM6 bvHPaEsCpRoDMCpi4g== =7X6D -----END PGP SIGNATURE----- --=-=-=--