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:
00175107
Views:
32
Hi George,

>Like I said, I could be wrong about it.

Actually, it seems like you are right, and I'm wrong.

>The question is where, and this seems to be the most likely candidate. Especially if the math co-processor comes into play at all.

The only reason I currently can think of is that the BINTOC format makes up a better index key, maybe for searching or for compressing indexes. Probably they use this format only internally, but don't treat it as a string, rather as an integer in a different format.

>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.

I could imagine that a function call has a huger overhead. Addition can be handled directly in the parser, while a function requires one step further. And if you used constants for your test, you have probably been fooled by the line optimizer in VFP. A line like var=1+2 is compiled as var=3. You can see this when you compare the FXP or recompile it with ReFox.

Christof
--
Christof
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform