DWUTKA at marlow.com
DWUTKA at marlow.com
Sun Oct 30 22:05:03 CST 2005
Ironically, I've been messing with arrays this weekend. I initially was using collections, but due to the multiple 'runs', the process was taking about a minute. Switching part of it to arrays cut that in half, and all the way to arrays got it down to 4 seconds in debug mode (less then a second compiled). One thing I did, which also immensely helped, is that I was passing strings to and from an array (actually, I was adding to a string over and over....and manipulating data within the string), along with copying one array to another. Instead of looping through, I used the copymemory API, instantaneous to and from the arrays and strings. Drew -----Original Message----- From: Gustav Brock [SMTP:Gustav at cactus.dk] Sent: Friday, October 28, 2005 9:50 AM To: accessd at databaseadvisors.com Subject: Re: [AccessD] Array faster in DLL? 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 -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com