From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?G=C3=B6ran?= Weinholt Newsgroups: gmane.lisp.guile.bugs Subject: bug#14916: Fixnum procedures can be made to return non-fixnums Date: Sat, 17 Aug 2013 09:55:14 +0200 Message-ID: <87y580vjj1.fsf@industria.weinholt.se> References: <8738r9ai62.fsf@industria.weinholt.se> <87ioz5gffz.fsf@tines.lan> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1376726294 4613 80.91.229.3 (17 Aug 2013 07:58:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 17 Aug 2013 07:58:14 +0000 (UTC) Cc: 14916@debbugs.gnu.org To: Mark H Weaver Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Sat Aug 17 09:58:17 2013 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VAbOq-0001ZG-Mx for guile-bugs@m.gmane.org; Sat, 17 Aug 2013 09:58:16 +0200 Original-Received: from localhost ([::1]:34867 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VAbOp-0002bX-UI for guile-bugs@m.gmane.org; Sat, 17 Aug 2013 03:58:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37082) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VAbOh-0002b4-J4 for bug-guile@gnu.org; Sat, 17 Aug 2013 03:58:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VAbOd-0001r4-2e for bug-guile@gnu.org; Sat, 17 Aug 2013 03:58:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:41663) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VAbOc-0001qv-L2 for bug-guile@gnu.org; Sat, 17 Aug 2013 03:58:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VAbOb-00076X-Q9 for bug-guile@gnu.org; Sat, 17 Aug 2013 03:58:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?G=C3=B6ran?= Weinholt Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Sat, 17 Aug 2013 07:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14916 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 14916-submit@debbugs.gnu.org id=B14916.137672627327291 (code B ref 14916); Sat, 17 Aug 2013 07:58:01 +0000 Original-Received: (at 14916) by debbugs.gnu.org; 17 Aug 2013 07:57:53 +0000 Original-Received: from localhost ([127.0.0.1]:35977 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VAbOR-000760-IN for submit@debbugs.gnu.org; Sat, 17 Aug 2013 03:57:52 -0400 Original-Received: from iustitia.weinholt.se ([46.16.232.230]:36910) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VAbON-00075k-Cs for 14916@debbugs.gnu.org; Sat, 17 Aug 2013 03:57:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=weinholt.se; s=iustitia2012; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References:Subject:Cc:To:From; bh=t5YrV8NzEjeWmVe3k6clWzMvTRRvbXiUBzOphX5fDoc=; b=Ag1R6IG1XSfiGYx8v0xxVL2Vh9++j/k9cRYFigWQ1BpJWFzrBUTCaJ8x5rc5bzyy+TlpYvbGT3S726XDkv/xZimFMNO9WoVC7jw2vTK5icm2cY1yP+oN6KZJkNh2/0OT8sVyAdvZLbb1BS0rwfNBP57YwJiPqCH++Jx1AzK3xbKIkt9sD1Rm3XKR0/HyRlamQw8Yj0tSQ0220RPSBTbUHLK5MIJ+xnzc1sdZEBbd1ZpMftDk8rXRXqO/meNtcQ2mzp0KVKTI25V8QMnv5UQ/pxIf1cU2flcL6TzC06wfqAzK5RtpioS13hnN5KEAiv9PiDHGvFJnL6BxKDt2VQTaoA==; Original-Received: from uucp by iustitia.weinholt.se with local-bsmtp (Exim 4.72) (envelope-from ) id 1VAbOL-0008PX-CN; Sat, 17 Aug 2013 09:57:45 +0200 Original-Received: from weinholt by industria with local (Exim 4.80) (envelope-from ) id 1VAbM4-0001W6-DI; Sat, 17 Aug 2013 09:55:24 +0200 X-Hashcash: 1:20:130817:14916@debbugs.gnu.org::tSWqhH3CUgCweKkD:00000000000000000000000000000000000000000SiX X-Hashcash: 1:20:130817:mhw@netris.org::asADUF11NMkFvmKR:0001OVx In-Reply-To: <87ioz5gffz.fsf@tines.lan> (Mark H. Weaver's message of "Fri, 16 Aug 2013 23:32:32 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:7256 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mark H Weaver writes: > G=C3=B6ran Weinholt 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, =2D-=20 G=C3=B6ran Weinholt "I knew it! He's stepping up his game! We must match his game with... MUCH MORE GAME!" -- The Monarch --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQIcBAEBCgAGBQJSDyxjAAoJEOM+YaLpuMOil0QP/01hvbmAMCyljPthKaKL7Lz0 SpxTkzyOW63guvkLkLCtixH1/aS8kGot62Bc7RDWinddgUF3Qf773ohO9Ded6Lvh EaaL4RuUkBUm9TtdgRjI8VfaQHEhcrmDyHZh1CeWp/BAuNFrb19jRz+J7mJfG/QQ wOAlul+d82bva5ToPK7+yZQTReKJi3QxB42v2KjBcxpwgeBD5aHMNMWDbC3szasa c/6xf/hfZVHE2KR8JHJ0D9Zr3E7/AZa7RzXYjTHgjc3ZEsP+APA/jbqwbNHrYkvH s1xEQDLoKJ8JPqqHsf8TWat01wnRkEhe9RExrEBqEGd8Jl2fv4EK14vben+XMFua yH8Sjwe4aVn2NsQlBkB/G3T7MJrGaw2p5aPaySW6yFC2pMZ4SEjOriWUd0Cvva1b KsHn8Eht0FCG64tJLKODB5P/7bYtgedB59lQZYpNDhZypKaDdVQ8IrixwRbqOM7l KtDsOseQt6rT+piESgo4K9pcxOZUMbJPjRQcXlwQl5TWedrFdjkEzAV7bSIhQU4X dOY/eg3yMkT/quY7Bmi9pozzZhf8GRvwWxMDSJUMM5wAUF9VlnJLksnbZXiBPmHU T9ZLbTHYUr83DfV3IJHCu7st8M04gsJoTw5g1s/vi7LioVYEIQDcw5aqRrgjNlb+ YA1q3La55V2IG6jl67uZ =cHlS -----END PGP SIGNATURE----- --=-=-=--