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

Home » Public Forums » archive » Re: Speed does matter
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: Speed does matter [message #91768 is a reply to message #91703] Mon, 24 August 2015 21:34 Go to previous messageGo to previous message
Dae-Kyu Shin is currently offline  Dae-Kyu Shin
Messages: 25
Registered: February 2015
Junior Member
2015년 8월 14일 금요일 오전 6시 19분 59초 UTC+9, Chris Torrence 님의 말:
> On Thursday, August 13, 2015 at 1:33:24 AM UTC-6, Kallisthène wrote:
>> I just ran the same tests on the official "unofficial" IDL 8.5 which promised some speed improvement. Strangely enough no such claims appeared in the "What's new" and indeed results of the above tests are strictly similar in IDL 8.5 ...
>>
>> The good news is that we can now switch to Python MKL inside IDL when dealing with poor performances.
>>
>>
>> Best
>
> Hi Kallisthène,
>
> Well, you posts contain a lot of information. If I could sum them up, I would say "IDL is faster at some computations, Python or Matlab is faster at others."
>
> It really does depend upon your code and your algorithm. To make a sweeping generalization, IDL's interpreter will be faster than Python's for "normal" problems - things with lots of "for" loops, small-to-medium size arrays, and image processing. Python and Matlab will be faster for hard-core linear algebra problems with large matrices.

IDL's for loops very slow comparesion with matlab.
for example

IDL(8.5) code

nx = 500
ny = 500
nz = 500

arr = dblarr(nx, ny, nz)


tic
for z = 0, nz - 1 do begin
for y = 0, ny - 1 do begin
for x = 0, nx - 1 do begin
arr[x, y, z] = 1
endfor
endfor
endfor
toc


And MATLAB(2014a) code
nx = 500;
ny = 500;
nz = 500;

arr = zeros(nx, ny, nz);

tic
for z=1:nz
for y = 1:ny
for x = 1:nx
arr(x,y,z) = 1;
end
end
end
toc

The result, on my desktop
IDL -- 5.16 second
MATLAB --0.45 second

Roughly, MATLAB's for loop x10 faster.




>
> The chances of compiling IDL against the Intel Math Kernel library is low - the IDL team isn't huge, and we have a lot of pending features on our plate.
>
> So I think your solution is a good one. Use IDL as your general purpose scripting engine, input/output of data, use it for medium-size arrays. Then use the Python bridge to process your large arrays.
>
> I'd love to see real-world examples of using the Python bridge, so please post again!
>
> Cheers,
> Chris
> VIS/Exelis/Harris
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Any way to initialize mapping in IDL with WKT or a Proj.4 string?
Next Topic: getting uniform cadence data

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

Current Time: Wed Oct 08 17:13:04 PDT 2025

Total time taken to generate the page: 0.00427 seconds