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

Re: Re: Re st: RE: open source


From   Ulrich Kohler <kohler@wz-berlin.de>
To   statalist@hsphsun2.harvard.edu
Subject   Re: Re: Re st: RE: open source
Date   Tue, 7 Sep 2004 12:50:10 +0200

As far as I can remember Bill Goulds "comment" was on the difference between 

/*  */

as oposed to 

//

the former runs slower because Stata need to check where the comment ends. 

uli

Nick Cox wrote:
> I just did some timings on a trivial program
> wrapped around
>
> 	di 42
>
> and the same program with 10,000 comment lines
>
> 	* a comment
>
> added. The time taken by the two programs
> is indistinguishable. Running the two 10,000
> times each produced the interesting result
> that the program with comments ran faster...
> I don't believe this, but I do assert that
> -- whatever Bill said, and I'd like to hear
> the context -- worries about
> speed should _not_, usually, inhibit users from
> adding comments to taste. That doesn't rule
> out minor but possibly useful tricks such
> as not putting comments within loops, but
> outside loops. (Thinks: I probably did that
> somewhere....)
>
> Nick
> n.j.cox@durham.ac.uk
>
> David Airey
>
> > Yes, I remember that too. I think it was the case that comments after
> > the program did not slow it down, because nothing was
> > interpreted after
> > end. I think perhaps this means the run copy could be up top and the
> > commented (documented) version down below or something like
> > that. There
> > are numerous texts (one good one by Microsoft) on the value of code
> > documentation. For the in house purposes of StataCorp, their level of
> > ado documentation must be adequate, otherwise they would be
> > inefficiently having to figure out the code and the fix. My guess is
> > that documentation would serve the user community more than StataCorp
> > by improving external programming skills. But, that's why we
> > pay for a product. Maybe the structure of the ado code should have this
> > formalized.
>
> *
> *   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/

-- 
kohler@wz-berlin.de
+49 (030) 25491-361


*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index