It seems important to begin by pointing out that this question is not aimed at solving a practical problem. It has nothing to do with a need on my part to make an actual program run faster or use fewer resources. Instead it has to do with a linguistics paper I'm writing, part of which will evaluate a claim recently made by Noam Chomsky, the world's most famous linguist (who most of you have probably heard of due to his politics, which is not the issue here).
The traditional view as to the structure underlying a sentence like (1) below, championed by Chomsky for years, has been the the participants are indexed (using subscripts like 'i' and 'j' as in (2) below), thus enabling the grammatical module which assigns meaning to resolve the ambiguity of the surface sentence (whether it is John's wife or Bill's who is to be called). Recently, supposedly in order to arrive at a more 'economical' system, Chomsky has proposed something like (3) below, where John is repeated in the underlying structure, but where the second occurrence is not sent to the pronunciation system (or is turned into 'his', but let that pass - in other sentences although not this one, the copy leads to nothing at all being pronounced). (1) John asked Bill to call his wife. (2) John-i asked Bill-j to call his-i wife. (3) John asked Bill to call John's wife. My question is which of these two approaches would be more economical from a programming point of view. Abstractly, the question seems to involve pointers vs. copying. Another point I should clarify: I know next to nothing about programming in 'C', including how to symbolize a pointer. But it seems to me the question boils down to which of the two methods below is more efficient. Right? Copy Method Pointer Method ----------- -------------- a = 2; a = 2; b = 3; b = 3; c = b; c = pointer-to(b); print a + c; print a + c; My guess is that (although the pointer method may use less memory), the speed of the two approaches may depend on whether it is more efficient to make a copy vs. establishing and then making use of a pointer. Secondly, my supposition is that the choice could depend on the complexity of the object in b. In the example above, it's just an integer. But suppose it were a complex object of some kind, instantiated in b, but then either copied to c or pointed to by c (with '+' having some different, object-appropriate definition by polymorphism). It that right? Or is the Pointer Method always more efficient? If it's a trade-off, how complex an object would tip the balance? Your collective wisdom would be greatly appreciated! Thanks, Peyton ------------------------------------------------------------- To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by http://www.fusionlink.com -------------------------------------------------------------
