Announcement

Collapse
No announcement yet.

Performance when reference DLLs

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Lance Edmonds
    replied
    Use a single DLL instead of two?

    Seriously, the best possible performance to call code repetitively is to convert the code into a subroutine and place it within the calling code sub/function.

    Yes, thats right: good old GOSUB and RETURN... simply because they do not require any stack frame setup or variable initialization, you can get the utmost performance from your code.

    This may often mean that you end up including the 'core' of the original DLL sub/function code in several places in your program. As long as these code blocks are not massive, and you don't have any variable scope issues (using the same variables names, etc), then for the small cost of an increase in app size, you can gain performance.

    Of course, YMMV depending on what your code does.

    ------------------
    Lance
    PowerBASIC Support
    mailto:[email protected][email protected]</A>

    Leave a comment:


  • Guest's Avatar
    Guest started a topic Performance when reference DLLs

    Performance when reference DLLs

    Hi,

    I have performance problem when I try to use a function from DLL.
    If I use a function within the same DLL is about 5 five times faster
    than calling a function from another DLL.
    Hope someone would have any suggestion on how to improve the
    performance a bit.

    LAC

    ------------------
Working...
X