Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BINTOC() and CDX size
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00173567
Message ID:
00174991
Views:
23
>Hi George,
>
>>I think it may have to do with the way strings are compared for being greater or less than as opposed to numeric values. I could be wrong about this.
>
>Somehow I can't believe this... Comparing two integers is merely comparing to register. With strings you have to compare byte by byte. Even if VFP would use a register here, too, it still has to handle string in a different way than a simple integer, like locking the handle, converting the handle to a pointer, unlocking the handle, etc.
>
Hi Christof,

Like I said, I could be wrong about it. I seems to me, however, that if there is a performance gain in using a character representation of an integer as opposed to the actual value that it has to come from somewhere. The question is where, and this seems to be the most likely candidate. Especially if the math co-processor comes into play at all.

Quite frankly, I don't know. In other instances my assumptions on what performs better have been wrong and this may be another. When VFP first introduced bitwise operators to language, I assumed that BITOR() with two values would be faster than the addition of them. My logic was that BITOR() would map directly to the processor's instruction set. In testing this, it seems that addition is faster. Why? The math co-processor? That's what I assume, but I can't offer any conclusive proof.
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform