unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Amirouche <amirouche@hyper.dev>
To: 39130@debbugs.gnu.org
Subject: bug#39130: Speed up C Foreign Function Interface
Date: Tue, 14 Jan 2020 12:15:06 +0000	[thread overview]
Message-ID: <8bbf48a40a280fb121bb5036ffd46b70@hyper.dev> (raw)

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?





             reply	other threads:[~2020-01-14 12:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-14 12:15 Amirouche [this message]
2020-02-18 13:23 ` bug#39130: Speed up C Foreign Function Interface Roel Janssen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8bbf48a40a280fb121bb5036ffd46b70@hyper.dev \
    --to=amirouche@hyper.dev \
    --cc=39130@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).