Message 1 of 13
vb string functions speed vs winapi

Not applicable
11-01-2003
11:11 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
i've been working on a vb routine to read textfiles and parse strings for
some time now. I have it 'almost nearly working'.
I've heard that vb string functions are inherently slow and the total time
for reading 100+ files, examining each line, parsing, compiling substrings,
and entering results in collections is running up to 90 seconds duration to
complete.
I'm wondering if it would be worth the time to rewrite most or all of my
string functions from vb to winapi. in hopes of speeding things up.
also wondering if some funcs would be likely to yield greater efficiency
improvement than others, eg lstrcomp, strpos etc??
anyone have any insight into this idea?
i suspect my slowest function is adding a string to a collection, inserting
it in alphabetical order. I probably should rewrite that to add
sequentially and then alphabetize when its all done.
i'll have to search through the api to see if there are functions for
filling collections..
maybe simulate a collection with copymemory or fillmemory? but i don't see a
read memory so i don't know how i'd read it back after filling?
any inspirations appreciated
tia
mark
some time now. I have it 'almost nearly working'.
I've heard that vb string functions are inherently slow and the total time
for reading 100+ files, examining each line, parsing, compiling substrings,
and entering results in collections is running up to 90 seconds duration to
complete.
I'm wondering if it would be worth the time to rewrite most or all of my
string functions from vb to winapi. in hopes of speeding things up.
also wondering if some funcs would be likely to yield greater efficiency
improvement than others, eg lstrcomp, strpos etc??
anyone have any insight into this idea?
i suspect my slowest function is adding a string to a collection, inserting
it in alphabetical order. I probably should rewrite that to add
sequentially and then alphabetize when its all done.
i'll have to search through the api to see if there are functions for
filling collections..
maybe simulate a collection with copymemory or fillmemory? but i don't see a
read memory so i don't know how i'd read it back after filling?
any inspirations appreciated
tia
mark