Moving a function from VB to VC

From: Ivan Debono (ivanmdeb_at_hotmail.com)
Date: 03/03/04


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



Relevant Pages

  • Moving a function from VB to VC
    ... This server is quite big and complex and one ... The algorithm is heavily modified to return ... An array of nodes(approx size 7000) ...
    (microsoft.public.vb.winapi)
  • Help on easy algorithm!!
    ... Input parameters are 2 arrays. ... One array is of long and can contain approx ... The algorithm should iterate through the small array and flag items in the ...
    (microsoft.public.vb.general.discussion)
  • Re: regex question - trying to find ".mp3" in a SELECT box
    ... But `Array' is a Function object reference. ... Establish a new execution context using F's FormalParameterList, ... Since is not a primitive value, the exception should be thrown. ... | 5.2 Algorithm Conventions ...
    (comp.lang.javascript)
  • Re: Mergesort Vs Quicksort
    ... I might not have correctly remembered my algorithm of months ago ... for sorting records in an array using one auxilary of the ... on how things turn out from lower levels of recursion, ... whether the number of records in the array segment to be sorted is ...
    (comp.programming)
  • Re: file system index corruption problem
    ... Citrix Presentation Server 4.0 installed. ... In the end I discovered that running chkdsk /f every night would ... I have changed the array controller and one of the ... Temporarily install an 80 GByte IDE disk. ...
    (microsoft.public.win2000.file_system)