This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author maltehelmert
Recipients belopolsky, gvanrossum, maltehelmert, pitrou, rbp
Date 2008-02-24.02:13:36
SpamBayes Score 0.005486656
Marked as misclassified No
Message-id <1203819218.22.0.269977296259.issue1040026@psf.upfronthosting.co.za>
In-reply-to
Content
Alexander, regarding your comments:

1. sysconf in general returns a long because it can return all sorts of
information, but os.times() returns clock_t items, so the _SC_CLK_TCK
value must comfortably fit into a clock_t. It's preferable to cast into
a clock_t immediately rather than doing a conversion for each of the
ensuing divisions.

2. Do you have indications that such platforms exist? In that case,
indeed the patch should be adapted. Is that -1 return value documented
somewhere?

3. I agree; 0 or -1 would be better.

4. You're right about the overhead, but someone (amk?) measured it and
it's only 5% compared to the old buggy behaviour. It's still possible to
do a million calls to os.times() from Python in a second, which is
plenty fast enough. Clearly the speed could be improved, but it doesn't
appear worth the complications to me.
History
Date User Action Args
2008-02-24 02:13:38maltehelmertsetspambayes_score: 0.00548666 -> 0.005486656
recipients: + maltehelmert, gvanrossum, belopolsky, pitrou, rbp
2008-02-24 02:13:38maltehelmertsetspambayes_score: 0.00548666 -> 0.00548666
messageid: <1203819218.22.0.269977296259.issue1040026@psf.upfronthosting.co.za>
2008-02-24 02:13:37maltehelmertlinkissue1040026 messages
2008-02-24 02:13:36maltehelmertcreate