Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Speed problems using Stata 8.2


From   Daniel Feenberg <[email protected]>
To   [email protected]
Subject   Re: st: Speed problems using Stata 8.2
Date   Fri, 23 Jul 2004 08:36:45 -0400 (EDT)

On Fri, 23 Jul 2004, Kroll, Lars Eric wrote:

> Dear Stata community,
> 
> 
> HARDWARE
> *********
> PC			 	STATA 8.2	Windows 
> 				set mem	(versions up to date)
> ================================================================
> P3   0,8 Ghz,  265RAM  	120m		NT 4
> P4   2,8 GHz,  512RAM  	120m 		NT 4
> P4HT 3,0 GHz,  512RAM  	120m 		XP Prof. 
> P4HT 3,0 GHz,  512RAM  	340m 		"
> P4HT 3,0 GHz,  512RAM  	800m 		"
> 
> 
> BUT: THERE WERE NO SIGNIFICANT SPEED DIFFERENCES BETWEEN THESE PC AND
> STATA CONFIGURATIONS STATA VERSION IS Intercooled STATA 8.2
> (1.7.2004). Is there Intel Hyper threading support in Stata 8.2?
> 

There is only one surprise in the this result. I wouldn't expect the
set memory to affect speed, nor does Stata take advantage of
hyper-threading, nor will the physical amount of memory affect the speed
once you have enough for the full dataset in core, nor does the OS have
much affect on Stata.

However, Stata on a 2.8GHz P4 is faster than a .8GHz P3 around here.
Could someone have upgraded the motherboard while you weren't looking? Do
you have any other compute-bound programs you could compare?

For example, taking the sample program from the help page for "simulate" I
get a runtime of 2.6 seconds on a 3GHz P4 and 3.6 seconds on a 1GHZP3.
Like you, I would have expected a greater difference. The faster machine
has 2 processors, each HT, and I can run 4 of the sample programs at once,
for an average time of 4.3 seconds each. (BTW, these are Linux boxes).
I also tried a Sparc 1.2GHZ processor, got 6.6 seconds.


Here is the program. It probably isn't typical. If I make the generate
statement a simple assignment the difference between the computers gets
quite a bit bigger.

program define lnsim, rclass
         syntax [, obs(integer 1) mu(real 0) sigma(real 1)]
         drop _all
         set obs `obs'
         tempvar z
         gen `z' = exp(`mu' + `sigma'*invnorm(uniform()))
         summarize `z'
         return scalar mean = r(mean)
         return scalar Var  = r(Var)
    end

simulate "lnsim, obs(100)" mean=r(mean) var=r(Var), reps(10000)



Daniel Feenberg



*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index