Message75699
> What's the purpose of your sdigit?
The type sdigit should be able to store a signed digit, so a number in
[-(2^15-1); 2^15-1]. short may be enough, but I think that the CPU
prefers (CPU is faster with) an int because it doesn't have to
truncate the MSB (eg. 32 bits (u)int => 16 bits (u)short). I also
used "int" because Python was already using "int" (right?)
> would probably be better off in longobject.h
Right.
> It's quite tempting to 'fix' _PyLong_AsScaledDouble to
> return e as the number of bits, rather than the number of digits
Good idea. But instead of writing a patch of 100.000 lines, I prefer
to start with a small patch and then add new patches to improve it. It
allows to apply only some patches but not all. Is
_PyLong_AsScaledDouble() used by another module than mathmodule.c?
> marshal.c
Same: it's better to write a separated patch.
--
I opened a new issue because the GMP and 30-bits patchs are too big
and it's not easy to review/commit them. The idea is to do small
changes to allow bigger changes later. |
|
Date |
User |
Action |
Args |
2008-11-10 14:00:37 | vstinner | set | recipients:
+ vstinner, gregory.p.smith, mark.dickinson |
2008-11-10 14:00:37 | vstinner | set | messageid: <1226325637.46.0.605046973772.issue4294@psf.upfronthosting.co.za> |
2008-11-10 14:00:36 | vstinner | link | issue4294 messages |
2008-11-10 14:00:36 | vstinner | create | |
|