would it be faster to use a VC++ DLL then a visual basic class module?
Printable View
would it be faster to use a VC++ DLL then a visual basic class module?
To do WHAT ???
carry the data of maps, basicly its about an object wich contains array and map info
I'm thinking of byte arrays in vb directly could be even faster.
also to calculate isometric position. and just map stuff
i heard long's are faster because they match cpu or somethingQuote:
Originally Posted by RhinoBull
and it shold be long because byte to small..
Yes, long integers are very fast but since I don't know (I couldn't possibly ...) how you store or generate your maps (it could be some algorithm that is based on vectors, etc ... or they are simply bmp, metafiles, etc ...) that is why I suggested to use byte array ...
This is a question that is impossible to answer. C++ is normally faster then VB however this all depends on how the code looks and how processor intense it is. VB has very slow (but powerfull) string handling routines and very slow generic graphic functions. But besides that compiling a private class into an EXE is normally faster then calling a COM object in a DLL (I don't know if you're talking about a COM object or not but I imagined that you did since you compared it with a VB class), since you don't have to go through all COM interfaces to reach the class implementation.Quote:
Originally Posted by nareth
Saying that C++ is always faster is a big lie. Bad written C++ code is generally much slower then good written VB code.
If you only want to keep some map data and do some simple isometric positioning calculation I wouldn't go through the trouble of writing that in C++. But I generally never cross the river just to get to the water, but that's just me :)