Here is an expansion on Noel's answer.
When the compiler sees a
(struct book (author title))
it creates code that allocates a vector of three words:
-- one that says "I am not a vector, but a book struct"
-- one that holds the author value
-- one that holds the title value
The functio
Structure access is implemented by taking the address of the structure
and adding an offset giving the memory address of the field. Addition
is an O(1) operation, as is memory referencing.
HTH,
N.
PS: Neither of the above statements are completely true, but they
suffice for a simple machine model
2 matches
Mail list logo