Moving a function from VB to VC
From: Ivan Debono (ivanmdeb_at_hotmail.com)
Date: 03/03/04
- Next message: Cecilio: "Problem with ShellExecute API oppening programs from network"
- Previous message: Robert: "Re: Intercept form Minimize/Maximize"
- Next in thread: Scott McPhillips [MVP]: "Re: Moving a function from VB to VC"
- Reply: Scott McPhillips [MVP]: "Re: Moving a function from VB to VC"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 3 Mar 2004 11:19:12 +0100
Hi all,
I've got the following situation currently all written in VB6. An ActiveX
EXE which acts as the server and various clients connect to it over a
clsUser multiuse object. This server is quite big and complex and one
function that it does it calculate the shortest paths from source to
destination using Dijkstra. The algorithm is heavily modified to return
k-shortest paths, for particular times, etc. and it all works fine and
reasonably fast but I was thinking of rewriting the algorithm in VC6/7 to
further increase performance.
For the algorithm, I currently need the following variables and structures
which I have identified as to be needed in the VC function:
- An array of nodes(vertices) (approx size 7000)
- An array of visited nodes (approx size 7000)
- An array of previous nodes (approx size 7000)
- An array of indexes (approx size 7000)
- An array of distances (approx size 7000)
- An array of edges (links between individual nodes) (approx size 80000)
The above arrays an initialized and kept in memory when a user connects to
the server. They a reinitialized for each each.
So before delving into this task, I'd like to ask some questions to you
C/C++ experts!!
1. Is a standard C/C++ DLL better/faster than creating an an ActiveX DLL
with all the COM stuff overhead?
2. How can I immediately & quickly copy a whole array from the sever to the
VC DLL instead of some kind of loop?
3. Are there any optimizations that I can do to increase performance?
Any suggestions welcome!!
Thanks,
Ivan
- Next message: Cecilio: "Problem with ShellExecute API oppening programs from network"
- Previous message: Robert: "Re: Intercept form Minimize/Maximize"
- Next in thread: Scott McPhillips [MVP]: "Re: Moving a function from VB to VC"
- Reply: Scott McPhillips [MVP]: "Re: Moving a function from VB to VC"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|