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

Home » Public Forums » archive » Chunk Array Decimation
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: Chunk Array Decimation [message #32377 is a reply to message #32363] Fri, 04 October 2002 15:07 Go to previous messageGo to previous message
JD Smith is currently offline  JD Smith
Messages: 850
Registered: December 1999
Senior Member
One more very depressing timing to report. I compiled a C version of
the literal accumulate loop, which consists entirely of:


for(i=0;i<=n_elts-1;i++) vec[inds[i]]+=data[i];

(omitting 10 lbs of DLM cruft). Here's a test run with 1,000,000
elements, each index repeated 20 times on average:

Literal Accumulate Loop: 1.2411
Reverse Indices Loop: 0.7217
Loop-Free with Sparse Arrays: 1.1401
FDDRIZZLE Loop: 0.7815
Dual Histogram Loop: 0.5490
Thinned WHERE Histogram Loop: 0.8422
Literal Accumulate: Compiled DLM : 0.0288

Yes, that's right, 20 times faster than the fastest pure IDL method.
What's really amusing is to compare the compiled and uncompiled
Literal Accumulate Loop, which uses precisely the same logic: 43 times
faster, which is the approximate penalty you pay for loops in IDL
vs. loops in C. This is optimized C (whereas IDL is not heavily
optimized), but it only uses one processor. Threads are not enough to
recover the tremendous difference between native compiled and IDL
code.

I discover this disparity about once every year, and then conveniently
forget about it, lest I should spend too much time writing function
declarations ;).

JD
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: ASTER Data
Next Topic: reading slices of FITS files

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

Current Time: Wed Oct 08 19:58:29 PDT 2025

Total time taken to generate the page: 0.00462 seconds