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

st: RE: RE: Displaying the time it takes to -list-


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: RE: Displaying the time it takes to -list-
Date   Wed, 26 Feb 2003 10:16:01 -0000

Nick Winter

> > How can I make Stata 8 display the time it takes from the
> moment I hit
> > <ENTER> after issuing a -list- command until the results are
> > displayed?
>
> I thought about this for a second before I did the tests
> listed above,
> and decided that, in fact, I doubt you can.
>
> What I did was
>
> 	. set rmsg on
> 	. set more off
>
> and then hit break as quickly as I could after the long
> listing started.
> That gives a timing of how long it takes to begin
> displaying and then to
> display however many records before I hit break.  (IE, it gives the
> time-to-start-of-list plus my reaction time.  I'm highly caffeinated
> today, so I think my reaction time is well under 0.5 seconds...)
>
> I figured that gave me a clear enough sense of how long it took (and
> made it clear to me that it took *much* longer to begin
> listing lots of
> records, compared to the shorter lists.)

Another handle for speed assessment is suppressing the display.
This means that we need model anybody's reaction times,
caffeinated or otherwise.

That is,

. set more off
. set rmsg on
. qui l
. qui l, clean nocompress
. qui l in 1/l
. qui l if 1

This makes Stata _think_ what it would show, but
refrain from showing it: normally a pointless request
with -list-, except for this purpose.

Some experiments show, as expected, detectable time savings from
-clean- and -nocompress- and, as mentioned
yesterday,

... in 1/l

is faster than

... if 1

Again, the stipulation -if 1- would normally be futile, as
the condition 1 is always true, but the purpose here is purely
assessing speed.

Nick
[email protected]

*
*   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