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

Home » Public Forums » archive » memory vs cpu
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: memory vs cpu [message #63610 is a reply to message #63534] Wed, 12 November 2008 20:25 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
On Nov 12, 7:15 am, aetherlux <aether...@gmail.com> wrote:
> Hi,
>
> I have detected a feature??? for all my programs written in IDL and I
> would like to have some feedback about if it is a possible problem
> with the code, hardware, etc.
>
> My usual configurations are:
> * idl 6.0 ; Debian GNU/Linux; core2 Quad 2.4; 4GB RAM
> * idl 6.0 ; Debian GNU/Linux; core 2 Duo 2.0; 2GB RAM
>
> 99.9% of the programs that I run suck 99% of the CPU and 0.1-0.2%. An
> example of a typical top output:
>
>   PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+
> COMMAND
> 13964 juan      25   0 50296 5640 3432 R  100  0.2  21481:08 idl
>
> My tipical code has several do and if loops, in some cases big arrays,
> and sometimes a hard work reading from files and written new ones. I
> usually include basic mathematical operations with floatings.
>
> I have basic knowledge of programming and I would like to know
> possible causes and if you think that it is possible to solve/improve
> it.

If you put 'WAIT, 1.0' at the end of your FOR loop, the percent CPU
utilization will be a lot lower :-)

More seriously, you will need to learn how to vectorize your code.
The first things to vectorize are the innermost loops.

Craig
[Message index]
 
Read Message
Read Message
Previous Topic: Re: How to control character size freely?
Next Topic: convert 003 and 033 to strings

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

Current Time: Tue Oct 14 17:22:52 PDT 2025

Total time taken to generate the page: 2.23839 seconds