comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: efficient use of call_external
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: efficient use of call_external [message #6282] Wed, 22 May 1996 00:00 Go to previous message
David Foster is currently offline  David Foster
Messages: 341
Registered: January 1996
Senior Member
nelson@star.net (Nelson Tarr) wrote:
>
> I am interested in any information on the speed improvement that can
> be expected in translating parts of an IDL procedure to C. I plan on
> using "call_external" to invoke the functions within my C module.
>
> I am also interested in suggestions about when it is most beneficial
> to use C instead of IDL.

If the operation you need can be performed using IDL's built-in
functions and/or array operations, you're better off sticking
with that. IDL functions are optimized very well.

If, in your code, you find yourself having to perform iterative
operations explicitly, then you are better off using C or Fortran,
as performance will improve DRAMATICALLY. Even though IDL code is
"compiled", the pseudo-code that is generated is interpreted,
so iterative operations take a big cut in performance.

Some of the examples of cases where we use CALL_EXTERNAL are:

1. Needed a "personalized" type of trilinear interpolation that
didn't use background (0) pixels in the interpolation (to
avoid aliasing an image with sharp edges).

2. A three-dimensional neighbor-averaging filter applied to a
3D data-set.

3. Needed a "personalized" run-length-encoding algorithm.

Hope this is useful.

Dave Foster
Brain Image Analysis Lab, UCSD
foster@bial1.ucsd.edu
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: window position / screen size
Next Topic: Avoiding memory paging with large data-set

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:33:25 PDT 2025

Total time taken to generate the page: 0.00345 seconds