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
> [email protected]
>
> 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/
--
[email protected]
+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/