From: "Göran Weinholt" <goran@weinholt.se>
To: Mark H Weaver <mhw@netris.org>
Cc: 14916@debbugs.gnu.org
Subject: bug#14916: Fixnum procedures can be made to return non-fixnums
Date: Sat, 17 Aug 2013 09:55:14 +0200 [thread overview]
Message-ID: <87y580vjj1.fsf@industria.weinholt.se> (raw)
In-Reply-To: <87ioz5gffz.fsf@tines.lan> (Mark H. Weaver's message of "Fri, 16 Aug 2013 23:32:32 -0400")
[-- Attachment #1: Type: text/plain, Size: 1613 bytes --]
Mark H Weaver <mhw@netris.org> writes:
> Göran Weinholt <goran@weinholt.se> writes:
>
>> the fxdiv procedure from (rnrs) fails to check that its result is
>> representable as a fixnum:
> Hmm. Currently, our fixnum and flonum operations are implemented in
> terms of the generic operations, with added checks. Whereas the most
> important generic arithmetic operations compile to VM instructions, the
> fixnum and flonum operations compile into procedure calls to scheme code
> that performs the checks and then uses the generic ops.
>
> Needless to say, this is terribly slow. I'm reluctant to make that code
> any slower by adding more checks.
I agree with this sentiment. The fixnum operations are supposed to be
fast, so making them slower doesn't make sense. There is a delicious
irony in the fact that the generic operations have all these extra
checks that would have to be undone by adding more checks afterwards.
> However, in the coming months I intend to reimplement the fixnum and
> flonum operations, using dedicated instructions in the new RTL VM which
> will be the basis of Guile 2.2.
>
> It would be possible to backport some of this to Guile 2.0 as well, but
> I'm not sure it's worth the effort.
>
> What do you think?
It's better to look toward the future. If Guile 2.2 will be much faster
then you get more leverage when optimizing the fixnum/flonum operations
than compared with Guile 2.0.
Regards,
--
Göran Weinholt <goran@weinholt.se>
"I knew it! He's stepping up his game! We must match
his game with... MUCH MORE GAME!" -- The Monarch
[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]
next prev parent reply other threads:[~2013-08-17 7:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-20 5:56 bug#14916: Fixnum procedures can be made to return non-fixnums Göran Weinholt
2013-08-17 3:32 ` Mark H Weaver
2013-08-17 7:55 ` Göran Weinholt [this message]
2016-06-21 7:20 ` Andy Wingo
2016-06-22 15:32 ` Mark H Weaver
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=87y580vjj1.fsf@industria.weinholt.se \
--to=goran@weinholt.se \
--cc=14916@debbugs.gnu.org \
--cc=mhw@netris.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).