Message75536
| Author |
vstinner |
| Recipients |
christian.heimes, gregory.p.smith, mark.dickinson, vstinner |
| Date |
2008年11月05日.23:13:27 |
| SpamBayes Score |
0.02307616 |
| Marked as misclassified |
No |
| Message-id |
<1225926808.5.0.75815096771.issue4258@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Mark: would it be possible to keep the "2 digits" hack in
PyLong_FromLong, especially with base 2^15? Eg. "#if PyLong_SHIFT ==
15". The base 2^15 slow, so don't make it slower :-)
- /* 2 digits */
- if (!(ival >> 2*PyLong_SHIFT)) {
- v = _PyLong_New(2);
- if (v) {
- Py_SIZE(v) = 2*sign;
- v->ob_digit[0] = (digit)ival & PyLong_MASK;
- v->ob_digit[1] = ival >> PyLong_SHIFT;
- }
- return (PyObject*)v;
- } |
|