GNU bug report logs - #39130
Speed up C Foreign Function Interface

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guile; Reported by: Amirouche <amirouche@HIDDEN>; dated Tue, 14 Jan 2020 12:16:01 UTC; Maintainer for guile is bug-guile@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 14 Jan 2020 12:15:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jan 14 07:15:32 2020
Received: from localhost ([127.0.0.1]:60756 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1irL6V-00063P-Ul
	for submit <at> debbugs.gnu.org; Tue, 14 Jan 2020 07:15:32 -0500
Received: from lists.gnu.org ([209.51.188.17]:51860)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <amirouche@HIDDEN>) id 1irL6O-00063B-Pa
 for submit <at> debbugs.gnu.org; Tue, 14 Jan 2020 07:15:26 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:34377)
 by lists.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <amirouche@HIDDEN>) id 1irL6J-0005wE-OE
 for bug-guile@HIDDEN; Tue, 14 Jan 2020 07:15:20 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_LOW
 autolearn=disabled version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <amirouche@HIDDEN>) id 1irL6E-00078r-FA
 for bug-guile@HIDDEN; Tue, 14 Jan 2020 07:15:15 -0500
Received: from relay11.mail.gandi.net ([217.70.178.231]:38401)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <amirouche@HIDDEN>) id 1irL6E-00078L-8y
 for bug-guile@HIDDEN; Tue, 14 Jan 2020 07:15:10 -0500
Received: from webmail.gandi.net (webmail14.sd4.0x35.net [10.200.201.14])
 (Authenticated sender: amirouche@HIDDEN)
 by relay11.mail.gandi.net (Postfix) with ESMTPA id 549B9100006
 for <bug-guile@HIDDEN>; Tue, 14 Jan 2020 12:15:06 +0000 (UTC)
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII;
 format=flowed
Content-Transfer-Encoding: 7bit
Date: Tue, 14 Jan 2020 12:15:06 +0000
From: Amirouche <amirouche@HIDDEN>
To: bug-guile@HIDDEN
Subject: Speed up C Foreign Function Interface
Message-ID: <8bbf48a40a280fb121bb5036ffd46b70@HIDDEN>
X-Sender: amirouche@HIDDEN
User-Agent: Roundcube Webmail/1.3.8
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
 [fuzzy]
X-Received-From: 217.70.178.231
X-Spam-Score: -1.6 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.6 (--)

I benchmarked Chez Scheme vs. Guile. Guile is 3 to 5 times slower
than Chez.  I attribute that mostly to C Foreign Function Interface.

The application will parse a text file (n-turtle format) and store
in an embedded database (wiredtiger).  Most the CPU time should be
spent during parsing [0], then packing scheme objects into
bytevectors [1] and at last C FFI.

[0] 
https://github.com/amirouche/nomunofu/blob/master/nomunofu/index.scm#L13

[1] 
https://github.com/amirouche/nomunofu/blob/master/nomunofu/okvs/pack.scm#L208

The chez code is in wip-chez branch.

The Guile FFI code of that particular application can be improved.

Still, I read on IRC that there is some interests to improve C FFI,
that is why I fill this issue to be able to keep track of it.

One step forward, would be to have C FFI benchmarks that are easy
to run with Chez, Guile, and Gambit.

Anyone up for the task?




Acknowledgement sent to Amirouche <amirouche@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guile@HIDDEN. Full text available.
Report forwarded to bug-guile@HIDDEN:
bug#39130; Package guile. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 14 Jan 2020 12:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.