What to avoid to improve speed of execution of SPSS code

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

What to avoid to improve speed of execution of SPSS code

Juan Pablo Sandoval
Hi Guys...
 
One simple question, can you give me some advice, many some do´s and dont´s in order to speed up the execution of my SPSS sintax... I know it´s not a good idea to use to many EXECUTES commands because it drastically reduces the speed of a program...
 
But I would like some other tips and recommendations...
 
Regards,
Reply | Threaded
Open this post in threaded view
|

Re: What to avoid to improve speed of execution of SPSS code

Albert-Jan Roskam
Hi,
 
Some things that come to mind:
Even if you do need an EXE, don't use it, but use something diagnostic instead, e.g. FREQ.
Use DATASET rateher dan SAVE for intermediate files.
If you use a DO IF structure, startt evaluating the most common category, e.g. DO IF (brd EQ "sparrow"), ELSE IF (bird EQ "penguin"). (Boolean shortcircuiting)
Use CACHE if you read data on a network share multiple times.
Make your data no longer and wider than you need (e.g. discard records and vars you won't use).

Cheers!!
Albert-Jan

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
All right, but apart from the sanitation, the medicine, education, wine, public order, irrigation, roads, a fresh water system, and public health, what have the Romans ever done for us?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

--- On Tue, 6/29/10, Juan Pablo Sandoval <[hidden email]> wrote:

From: Juan Pablo Sandoval <[hidden email]>
Subject: [SPSSX-L] What to avoid to improve speed of execution of SPSS code
To: [hidden email]
Date: Tuesday, June 29, 2010, 2:29 AM

Hi Guys...
 
One simple question, can you give me some advice, many some do´s and dont´s in order to speed up the execution of my SPSS sintax... I know it´s not a good idea to use to many EXECUTES commands because it drastically reduces the speed of a program...
 
But I would like some other tips and recommendations...
 
Regards,

Reply | Threaded
Open this post in threaded view
|

Re: What to avoid to improve speed of execution of SPSS code

J P-6
When workling with very large data sets i create a representative subset of the data for testing code. 


From: Albert-Jan Roskam <[hidden email]>
To: [hidden email]
Sent: Tue, June 29, 2010 9:34:18 AM
Subject: Re: What to avoid to improve speed of execution of SPSS code

Hi,
 
Some things that come to mind:
Even if you do need an EXE, don't use it, but use something diagnostic instead, e.g. FREQ.
Use DATASET rateher dan SAVE for intermediate files.
If you use a DO IF structure, startt evaluating the most common category, e.g. DO IF (brd EQ "sparrow"), ELSE IF (bird EQ "penguin"). (Boolean shortcircuiting)
Use CACHE if you read data on a network share multiple times.
Make your data no longer and wider than you need (e.g. discard records and vars you won't use).

Cheers!!
Albert-Jan

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
All right, but apart from the sanitation, the medicine, education, wine, public order, irrigation, roads, a fresh water system, and public health, what have the Romans ever done for us?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

--- On Tue, 6/29/10, Juan Pablo Sandoval <[hidden email]> wrote:

From: Juan Pablo Sandoval <[hidden email]>
Subject: [SPSSX-L] What to avoid to improve speed of execution of SPSS code
To: [hidden email]
Date: Tuesday, June 29, 2010, 2:29 AM

Hi Guys...
 
One simple question, can you give me some advice, many some do´s and dont´s in order to speed up the execution of my SPSS sintax... I know it´s not a good idea to use to many EXECUTES commands because it drastically reduces the speed of a program...
 
But I would like some other tips and recommendations...
 
Regards,