Message117714
| Author |
skrah |
| Recipients |
Kiriakos.Vlahos, brian.curtin, eric.smith, loewis, mark.dickinson, sjmachin, skrah |
| Date |
2010年09月30日.09:54:25 |
| SpamBayes Score |
3.5254024e-07 |
| Marked as misclassified |
No |
| Message-id |
<1285840467.89.0.163007382103.issue9980@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
I wonder if calling _Py_SET_53BIT_PRECISION_START/_Py_SET_53BIT_PRECISION_END
every time will have any measurable effect on performance. First, string
conversions have a lot of overhead already. Then, for compilers that already
set the correct control word, only fnstcw is called.
Attached is a quick and dirty benchmark. The correct state is set at
the start of the program. The first loop does not change the FPU state,
the second one uses the macros, the third one always sets/restores.
time: 0.000000 result: 1.90013e+122
time (fnstcw): 0.570000 result: 1.90013e+122
time (fnstcw/fldcw): 2.560000 result: 1.90013e+122
I would feel more comfortable if the correct FPU state is guaranteed. |
|