[AccessD] Array faster in DLL?

MartyConnelly martyconnelly at shaw.ca
Fri Oct 28 11:04:41 CDT 2005


Some of these replacements for VB intrinsic fumctions might speed things up.
Make sure you read the accompaning notes before using some may require a TLB
http://www.xbeat.net/vbspeed/index.htm

But it sounds like you are using mostly math functions.
Trig functions can be enhanced from basic vba calls but would require C.
Sometimes you can get a bit more speed from multidimensional arrays by 
the order of looping on the indexes.
For example you are not going to get much speed increase by using *0.5 
instead of  /2
maybe 1-2%

Gustav Brock wrote:

>Hi Jim
>
>Sounds great! 
>No they are not classes. I simply pass ByRef an array to a function which shuffles around the content of the array according to some rules and other params. Would I need to wrap such a function in a class?
>
>/gustav
>
>
>  
>
>>>>Jdemarco at hudsonhealthplan.org 28-10-2005 15:41:34 >>>
>>>>        
>>>>
>Gustav,
>
>I'd expect some speed increase from compiled code but how much is hard to say.  It's doubtful that it would cut the time in half but it's certainly a possiblity.
>
>Are your routines in class modules?  If not and you can write them into a class or classes I'd be glad to compile them for you so you could test.
>
>Jim DeMarco
>
>-----Original Message-----
>From: accessd-bounces at databaseadvisors.com 
>[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Gustav Brock
>Sent: Friday, October 28, 2005 9:30 AM
>To: accessd at databaseadvisors.com 
>Subject: [AccessD] Array faster in DLL?
>
>
>Hi all
>
>I have some routines that manipulate data in and between some arrays. 
>The arrays are not large but they are recalculated about 3 mio. times which runs on my machine to 90 seconds.
>
>I was wondering if there would be any significant speed increase by moving these routines to a DLL. I have no experience in writing such libraries but guess I could find as the routines are uncomplicated. Variables are Long mostly, only one Single. 
>It would take me some time to program these, of course, and if the speed increase only could be expected to be, say, 30%, it wouldn't hardly be worth it.
>
>Does anyone (Drew, Stuart?) have experience about what to expect?
>
>/gustav
>
>
>  
>

-- 
Marty Connelly
Victoria, B.C.
Canada






More information about the AccessD mailing list