|
-
Aug 18th, 2013, 05:25 AM
#25
Re: Passing Array of Strings Between ViB and C
 Originally Posted by Schmidt
There's no need to "come up with some simple StringOp" anymore to prove that you are wrong with your statement about speed.
E.g. the vb6-runtime is written in C++ and comes with a Replace-function, which in tests proved up to 10-15 times slower than an optimized Replace written in VB6 itself.
http://www.xbeat.net/vbspeed/c_Replace.htm#Replace10
In the german newsgroups we dealt with safearrays already before Matt Curlands book came out - not sure about the english VB-
newsgroups at that time - I was not yet participating there because I couldn't speak more than a few words of the english language then.
Bonnie thankfully corrected your wrong statement about immutability of BSTRs already on two counts (SafeArrays and the Mid-statement)
Fair enough, I'll concede this point to you. However:-
 Originally Posted by Schmidt
That you failed writing a fast parser in
VB6 doesn't mean that it cannot be done Niya - don't judge from your own capabilities on the capabilities of others -
I will not waste my time trying to hack VB6 in an effort to fit a square peg in a round hole. Its far easier to simply write the damn thing in C++. String processing isn't the only thing VB6 suffers at(barring the mentioned techniques). I also had experience with its terrible performance with image processing. I remember writing a screen saver and I wanted pretty effects but was unwilling to learn DirectX as I didn't really want all the bells and whistles of it. I just needed a couple of functions to do some simple blending effects and some colour matching if I remembered correctly. My initial attempts in VB6 yielded disastrous performance. I ended up porting most of the image processing to a C++ library and saw significant improvement in performance.
VB6 has way too much overhead for these types of algorithms to work efficiently without hacking. If you can hack your way around it, then more power to you. But if you are capable of writing them in C/C++ then I'd strongly recommend it as the better approach. I endorse the OP's attempt to do this in C++ if her reason is for performance.
Last edited by Niya; Aug 18th, 2013 at 05:35 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|