From: Ronald Vogelaar <enter at rovosoft dot com>
Faster than countfields? I'd actually doubt it myself, to be honest.
I'll probably test this at somepoint, however. Just to make sure. It
may be that this result you got only applies in certain cases.
Come, come, since when have you become so modest ;-)))
Hmmm, no I honestly do believe that this isn't a good comparison.
CountFields (the idea) is intrinsically a more efficient technique to
counting fields than:
while fi.MoveNext
Count = Count + 1
wend
A CountFields function is simply better able to count the fields fast.
The fact that you say it doesn't, surprised me.
You have to understand, that if you have an RB function that can do
something in 1 function call, and you can do the same thing with my
plugin but with 5 function calls... well my plugin may be slower. With
a loop, there's a lot of extra overhead.
If I were to implement a countfields, I'd check for if it is a single
byte first, and if so, use a special bytecount loop. That would be
unbeatable! If your speed results are true, then RS doesn't do this. If
they did, then theirs would probably be at least 2x faster than mine.
But that would be OK, because ElfDataFields doesn't need CountFields
anyhow :o)
By the way, your "FastCountFields" could be implemented using my
plugin... no problem there. You could even make it use a string param
if you like. I think one operator_convert won't hurt when its not in
the hot loop.
Not in RBScript it can't. Can it?
Ah. Shame. I've already REALrequested the ability to get access to
selected utility classes from RBScript, in the past.
--
Theodore H. Smith - www.elfdata.com/plugin/ - www.elfdata.com/forum/
ElfData: Industrial strength string processing, made easy.
"All things are logical. Putting free-will in the slot for premises in
a logical system, makes all of life both understandable, and free."
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|