24-11-2006, 02:54 AM
Hi all! I did a very amazing test with VB and C++, comparing both. I want to change all my code to C++ couse everybody says it is faster, and it is. I developed a DLL with 2 Sum functions, one that uses 2'byval's, 'a' and 'b' variables and the other uses 'byref', 'S' as a structure(type) that has a 'a' and 'b' vars. I did the same functions inside VB, and tested both thru VB, so I just compiled the DLL and used it's functions thru VB. Then I F5 inside VB and realized that C's DLL was much faster, almost 2X faster than VB's. Then I compiled the VB project and executed the exe file. Then I noticed a VERY IMPORTANT THING! VB was faster that time! And almost 2X faster than C's DLL. I tought I did something wrong and noticed that I didn't. It realy was the great VB acting again... When the VB code was 'ran' using F5 it got MUCH MUCH slower than the SAME compiled code! So I'm warning you to don't host your server thru 'ran' VB code for peaple. First compile the code and then execute the exe file. I'll do a few more tests w/ the same functions being used from C++, and not VB, to see if C++ is realy much faster then VB.
It's just a warning becouse I used to do that when the server was bugued, I used to run the server thru VB and then wait until it bugs so I can fix. Don't do that! xD
It's just a warning becouse I used to do that when the server was bugued, I used to run the server thru VB and then wait until it bugs so I can fix. Don't do that! xD