From: ludo@gnu.org (Ludovic Courtès)
To: guile-devel@gnu.org
Subject: Re: Putting an end to "compiled closures"
Date: Sun, 08 Mar 2009 17:18:46 +0100 [thread overview]
Message-ID: <871vt8t2c9.fsf@gnu.org> (raw)
In-Reply-To: 87bpskzukl.fsf@gnu.org
Hello!
I did some more fiddling with gsubrs:
http://git.savannah.gnu.org/gitweb/?p=guile.git;a=commitdiff;h=8321ed20f69b4c56cb680563160cd30ecac8f509
The change adds a vararg function to invoke gsubrs when the number of
arguments is known, thereby eliminating consing.
The benchmark is as follows:
- before
("subr.bm: subr invocation: simple subr" 700000 total 0.98)
("subr.bm: subr invocation: generic subr" 700000 total 1.39)
("subr.bm: subr invocation: generic subr with rest arg" 700000 total 1.32)
("subr.bm: subr invocation: generic subr with rest arg and 3+ parameters" 700000 total 1.63)
- after
("subr.bm: subr invocation: simple subr" 700000 total 1.0)
("subr.bm: subr invocation: generic subr" 700000 total 1.1)
("subr.bm: subr invocation: generic subr with rest arg" 700000 total 1.19)
("subr.bm: subr invocation: generic subr with rest arg and 3+ parameters" 700000 total 1.65)
That's again a 20% improvement for gsubrs with no rest argument
(`hashq-ref', `substring', `open', `string-upcase', `gettext', etc.) and
a 10% for procedures with a rest argument called with less than 3
arguments (e.g., `(cons* 1 2)', `(run-hook h 1)', `(throw 'foo 'bar)',
`(make-regexp "foo")').
Thanks,
Ludo'.
next prev parent reply other threads:[~2009-03-08 16:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-16 0:22 Putting an end to "compiled closures" Ludovic Courtès
2009-02-23 22:10 ` Ludovic Courtès
2009-03-01 23:34 ` Ludovic Courtès
2009-03-08 16:18 ` Ludovic Courtès [this message]
2009-03-10 23:52 ` GC brokenness in `master' Ludovic Courtès
2009-03-11 0:08 ` Neil Jerram
2009-03-11 9:23 ` Ludovic Courtès
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=871vt8t2c9.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guile-devel@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).