Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.
6712 Discussions

can IPP improve performace of calling functions from a dll

yinyang2006
Beginner
312 Views
can IPP improve performace for calling functions from a dll, (both exe and dll are built using Intel C++), the scenario is like this: an application calls on a dll function that has a standard parameter/return types, i.e. UCHAR, USHORT and ULONG. can this be optimized? i mean, for having only those types as its argument type and return value? furthermore,



functions to be called are stacked in a vector, and each item in the vector contains, ADDRESS of the function(DWORD), SIZE of the arguments(UINT) and ARGUMENT buffer (const void* args) w/ this data i am able to call upon any function in my dll-







thanks.
0 Kudos
5 Replies
Vladimir_Dudnik
Employee
312 Views

Hello,

IPP is set of libraries which contain highly optimized functions in different areas of interset, like signal processing, image processing, audio, speech, image and video coding. Regarding IPP performance you can refer to performance data we distribute with IPP. You can find this data in your IPP oolsperfsysdata folder.

Performance of IPP functions depends mainly on used algorithms rather then on types of function's arguments.

Regards,
Vladimir

0 Kudos
yinyang2006
Beginner
312 Views
i see,
anyway what can you advice for
my app that calls for about 360K times a function, parameters stored in a vector?
0 Kudos
Vladimir_Dudnik
Employee
312 Views
It is difficult to advise something without knowledge of what you are trying to do. Probably you can revise yourapplication design to place data processing in one function instead of 360K calls?
Vladimir
0 Kudos
yinyang2006
Beginner
312 Views
sorry for not clarifying what i said, but its like this, i have a generic DispatchFunction that can call on any function via function address in a dll/exe, what i mean in '360k' is that there are 0-360k parameters stored in a std::vector that are to be passed to that dispatch function...

but the reason i trying to venture here, is that of reading those parameters above from file, but it takes much time, i tried to manually unroll it, but still slow, i'm using Pentium 4(prescott) it takes 225 millisecond to complete (reading 360*256 bytes)?

also this code has 4MB aliasing problem, but i'm just reading 256bytes of data at a time from a file??

about the calling of function, i'm thinking if there's an intel specific way of calling functions of that kind... since our product will be using Pentium4 cpu?

thanks.
0 Kudos
Vladimir_Dudnik
Employee
312 Views

it is still difficult for me to understand whereyour problem is. In general, to optimize software, for example JPEG code (see IPP JPEGView sample), we are trying to focus IPP on time critical, low-level operations, like DCT, color-conversion, sub-samplingin case ofJPEG. These low-level operations are simple, and comparately small pieces of code which can be optimized with using assembler. For not time-critical part, of course it is more convenient to use high level language, like C or C++.

For what you are saying, if passing 360Kb parameters means copying of memoryblock,you can utilize power of Intel Pentium IV with using ippsCopy functions. But in this case you need to revise your application design to minimize use of standard template library in time critical parts of your application.

If you are talking about reading data from file, it usually have nothing to do with Intel specific optimizaton because it is related to hard drive access time. I can recommend you to do prefetching all data from file before going to processing loop, so after you may need only copying from memory to memory, which can be effectively speeded up with using IPP functions.

Vladimir

0 Kudos
Reply