* size of fixnums
@ 2010-09-01 22:22 Stefan Israelsson Tampe
2010-09-02 15:58 ` errata: " Stefan Israelsson Tampe
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Israelsson Tampe @ 2010-09-01 22:22 UTC (permalink / raw)
To: guile-devel
Hi,
I noticed that sending a fixnum 6bytes long to guile returned a
truncated fixnum of 4 of 4 bytes. I guess that this would not break
the numeriks but it looks like we are wasting space here and/or clock
cycles.
The suspicius part is line 66 in numbers.h
#define SCM_MOST_POSITIVE_FIXNUM ((SCM_T_SIGNED_BITS_MAX-3)/4)
which means that trunkation will be at 4bytes on a 64bit system.
I changed 4 to 2 (mayby unsafe in corner cases) and the truncation
disapeared.
So Bugg Feature?
Regards
Stefan
^ permalink raw reply [flat|nested] 2+ messages in thread
* errata: size of fixnums
2010-09-01 22:22 size of fixnums Stefan Israelsson Tampe
@ 2010-09-02 15:58 ` Stefan Israelsson Tampe
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Israelsson Tampe @ 2010-09-02 15:58 UTC (permalink / raw)
To: guile-devel
Hrm, the coffee must have been strong last night,
I spotted the bug, It's not inside guile.
Cheers
Stefan
On Thursday, September 02, 2010 12:22:35 am you wrote:
> Hi,
>
> I noticed that sending a fixnum 6bytes long to guile returned a
> truncated fixnum of 4 of 4 bytes. I guess that this would not break
> the numeriks but it looks like we are wasting space here and/or clock
> cycles.
>
> The suspicius part is line 66 in numbers.h
>
> #define SCM_MOST_POSITIVE_FIXNUM ((SCM_T_SIGNED_BITS_MAX-3)/4)
>
> which means that trunkation will be at 4bytes on a 64bit system.
> I changed 4 to 2 (mayby unsafe in corner cases) and the truncation
> disapeared.
>
> So Bugg Feature?
>
> Regards
> Stefan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-09-02 15:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-01 22:22 size of fixnums Stefan Israelsson Tampe
2010-09-02 15:58 ` errata: " Stefan Israelsson Tampe
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).