On Thu, 05 Oct 2000 12:58:42 BST, Simon Cozens wrote: >Yup, it dawned on me a few minutes after posting that we can't do much >else because to discover whether you can use the integer >addition/subtraction/etc. on, say, C<$a+3> you have to go through the >whole looks_like_number thing to find out whether C<$a> is really an >integer or a float. So it would lose anyway. Bletch. A potential avenue of exploration that I recall mentioning here would be to never convert to PVNV unless the NVX slot is being set by the operation, or if an attempt is being made to read a PV as an NV. IOW< an attempt to *read* the NV should never promote if the SV is an IV; instead it should cast the IVX to NV and return that. Among other things, this means making SvNV() do something like this: #define SvNV(sv) (SvNOK(sv) ? SvNVX(sv) : (SvIOK(sv) ? (NV)SvIVX(sv) : sv_2nv(sv))) instead of this: #define SvNV(sv) (SvNOK(sv) ? SvNVX(sv) : sv_2nv(sv)) You could try that (embellish it further for UVness) and see where that takes you performance-wise... Sarathy gsar@ActiveState.comThread Previous | Thread Next