[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Error 909: obs must be between 0 and NNN

From   [email protected] (William Gould, StataCorp LP)
To   [email protected]
Subject   Re: st: Error 909: obs must be between 0 and NNN
Date   Tue, 29 Jan 2008 13:04:03 -0600

Sergiy Radyakin <[email protected]> wrote, 

> I thought Stata stores data by observation, and has an index of pointers,
> which shows memory addresses of each observation.  Which is very convenient
> for sorting, as the observations themselves do not have to be moved,

Stata does exactly what Sergiy thought.  

I mention that just so no one gets confused:  Stata can access all the memory
on 64-bit computers, and Stata is very efficient at it.  One way Stata
achieves its speed is, just as Sergiy thought, Stata seldom moves data, Stata
does the EQUIVALENT of pointer swaps.  The emphasis here is on the word

Sergiy also wrote, "I am actually surprised that the pointers turned out to be
32bit wide on 64bit machines."  They do not.  I know that statement is
meaningless to most people, but I don't want anyone repeating it within
earshot of a system administrator of computer science person because he or she
will immediately come to the conclusion that Stata must not be very good
because it was programmed by amateurs.  Rather, the statement is not true.

Sergiy assumed that we use C pointers and I should have been clearer about
that.  We are now getting into details of how we accomplish the above and that
is not especially interesting.  The method Stata uses produces exactly the
same result as if we used C pointers, but through trickery, we are able to
save 4-bytes per observation.

-- Bill
[email protected]
*   For searches and help try:

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