From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: David Pirotte Newsgroups: gmane.lisp.guile.user Subject: Re: guile-user Digest, Vol 193, Issue 30 Date: Thu, 27 Dec 2018 03:54:44 -0200 Message-ID: <20181227035351.56688a10@capac> References: <6bf4cf28-8063-33a6-7dca-a9759fe71f5b@gmail.com> <20181227021610.6a8904c6@capac> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/IkMGjgvIJW39F1+TlRe_XE0"; protocol="application/pgp-signature" X-Trace: blaine.gmane.org 1545889997 14258 195.159.176.226 (27 Dec 2018 05:53:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 27 Dec 2018 05:53:17 +0000 (UTC) Cc: guile-user@gnu.org To: Zelphir Kaltstahl Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Thu Dec 27 06:53:13 2018 Return-path: Envelope-to: guile-user@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 1gcObX-0003Z6-Ao for guile-user@m.gmane.org; Thu, 27 Dec 2018 06:53:11 +0100 Original-Received: from localhost ([127.0.0.1]:49607 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gcOdd-0001b5-JU for guile-user@m.gmane.org; Thu, 27 Dec 2018 00:55:21 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:43834) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gcOdI-0001al-Na for guile-user@gnu.org; Thu, 27 Dec 2018 00:55:01 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gcOdF-0000d4-FI for guile-user@gnu.org; Thu, 27 Dec 2018 00:55:00 -0500 Original-Received: from maximusconfessor.all2all.org ([79.99.200.102]:33388) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gcOdF-0000SW-5i for guile-user@gnu.org; Thu, 27 Dec 2018 00:54:57 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by maximusconfessor.all2all.org (Postfix) with ESMTP id 460C81BE00E2; Thu, 27 Dec 2018 06:54:54 +0100 (CET) Original-Received: from maximusconfessor.all2all.org ([127.0.0.1]) by localhost (maximusconfessor.all2all.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 55edc0kA3Sk5; Thu, 27 Dec 2018 06:54:54 +0100 (CET) Original-Received: from capac (189-70-205-45.user.veloxzone.com.br [189.70.205.45]) by maximusconfessor.all2all.org (Postfix) with ESMTPSA id E86B71BE00E1; Thu, 27 Dec 2018 06:54:52 +0100 (CET) In-Reply-To: <20181227021610.6a8904c6@capac> X-Mailer: Claws Mail 3.17.2 (GTK+ 2.24.32; x86_64-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 79.99.200.102 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.org gmane.lisp.guile.user:15152 Archived-At: --Sig_/IkMGjgvIJW39F1+TlRe_XE0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Zelphir, > ... > Now, using Guile-CV, on my relatively slow laptop (i5-2450M CPU @ 2.50GHz= =C3=97 4 - 6GB > RAM): > scheme@(guile-user)> ,use (cv) > scheme@(guile-user)> (im-make 1000 1000 1) > $5 =3D (1000 1000 1 (#f32(0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 > 0.0 # =E2=80=A6))) > scheme@(guile-user)> ,time (im-transpose $5) > $6 =3D (1000 1000 1 (#f32(0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 > 0.0 # =E2=80=A6))) ;; 0.342220s real time, 0.367022s run time. 0.040217s= spent in GC. >=20 > scheme@(guile-user)> (im-make 1000 10000 1) > $7 =3D (1000 10000 1 (#f32(0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0= .0 > 0.0 # =E2=80=A6))) >=20 > scheme@(guile-user)> ,time (im-transpose $7) > $8 =3D (10000 1000 1 (#f32(0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0= .0 > > 0.0 # =E2=80=A6))) ;; 3.186683s real time, 3.374562s run time. 0.30318= 7s spent in GC. >=20 > But I see that im-transpose still is pure scheme code, I'll write the low= level > operation in C and post back ... I moved the im-transpose core functionality to libguile-cv, and now I get t= hese results (roughly 22x faster): scheme@(guile-user)> ,use (cv) scheme@(guile-user)> (im-make 1000 1000 1) $2 =3D (1000 1000 1 (#f32(0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 = 0.0 # =E2=80=A6))) scheme@(guile-user)> ,time (im-transpose $2) $3 =3D (1000 1000 1 (#f32(0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 = 0.0 # =E2=80=A6))) ;; 0.027255s real time, 0.035129s run time. 0.014336s spent in GC. scheme@(guile-user)> (im-make 1000 10000 1) $4 =3D (1000 10000 1 (#f32(0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0= 0.0 # =E2=80=A6))) scheme@(guile-user)> ,time (im-transpose $4) $5 =3D (10000 1000 1 (#f32(0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0= 0.0 # =E2=80=A6))) ;; 0.141708s real time, 0.147565s run time. 0.024564s spent in GC. Note that if yo plan to 'play with' Guile-CV (and expect the above last fig= ures): (a) you have to install form the source and check the devel branch (didn't merge to master yet and do not plan to release soon); (b) make sure you read the 'Configuring Guile for Guile-CV' before you even start ... Cheers, David --Sig_/IkMGjgvIJW39F1+TlRe_XE0 Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEhCJlRZtBM3furJHe83T9k6MFetcFAlwkaSQACgkQ83T9k6MF etdLnwgAxIPSRUyt0c5wTCG8XbDAAn8ZV5JYWPJLSd48E66VaQNSUyE8ESSfjTOD reOEPrzN47LZKZKPdSLym14fDwGv6Sq5kuj8o6hspA7i5s347Al+e8z1arKQnQVc U52TfkLRxpEmn4mAwjtDPlZP67WknIgLcJyioF8QQAYC+zcMSgjiBjESuxO6Ct53 0v+BLeFdMvray1j7FGzQrJMhNdymPiQ7x66y85/A8KeGTFNZ5iAxfhpOVUmo4TG8 KZTEn94Jm6Sr8NDnY2dAWKZi3ujw4TmmvGZSUoVtWtzxBkj6uNKM2RZuNt5uBAPT 7Vm1YGdSvQjPBBLJvNYZFMvG2saodg== =Jax1 -----END PGP SIGNATURE----- --Sig_/IkMGjgvIJW39F1+TlRe_XE0--