Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
About Hosting and VB it selfs
#4
I did the same test w/ C++, direticly from it, no DLL. It was pretty much faster!
Verrigan told me about VB's compiling stuff and I made it much faster, selecting that options, but it stills slower than C++.
I used a simple sum function, I dont think there is a way to make sum faster. If there is, tell me ^^
I'll post in a few minutes the times I get on my computer.

EDIT:
All tests were are like this:
start count
for i = 1 to 10^6
tmp=sum(i,i)
next i
tells me the time lapsed, in miliseconds.

I tried the 2 types of sending the values, ByVal and ByRef, for VB and C++, so I'll show you both results. All resulst are the best one I could get on my computer.

Thru VB:
VBFunction(ByVal): 63
VBFunction(ByRef): 78
C++Function(DLL,ByVal): 125
C++Function(DLL,ByRef): 141

Thru C++:
C++Function(ByVal): 31
C++Function(ByRef): 46

This tests showed me that C++ was much faster than VB in all cases.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)