In my previous message I outlined the single most significant
performance enhancement we found in the inner core of routines in the
LINKAGE programs. The one change makes a 2 fold speed improvement.
There are some other changes we have found that when added to the
first one make a total of about a 3 fold improvement. So working on
the code in the core routines does not look like it is going yield
alot more improvement.
One of the next areas we are working on is optimizing the tree
traversal strategy. In studying this I came across a piece of code
which looks like a bug. Notice the variable multi below
PROCEDURE multimarriage(VAR p:ind);
VAR
q,child:ind;
BEGIN {multimarriage}
IF p^.foff<>NIL
THEN with p^ DO
BEGIN
IF male
THEN q:=foff^.ma
ELSE q:=foff^.pa;
child:=foff;
p^.multi:=false;
repeat
IF male
THEN BEGIN
multi:=q=child^.ma;
child:=child^.nextpa
end
ELSE BEGIN
multi:=q=child^.pa;
child:=child^.nextma
end
until (child=NIL) or (multi)
end
ELSE p^.multi:=false
end; {multimarriage}
If p has no offspring then multi is false. If p does have children,
then multi is true no matter what the situation (so why is this coded
as a loop). Something doesnt look right here. Any ideas?
I suspect that multi should indicate if p has produced offspring from
more than one marriage. I have written to Mark Lathrop, but he has
not given me a reply regarding this.
Thanks for any help or advice.
Bob
------------------------------------------------------------
Bob Cottingham Phone: 713/798-4275
Cell Biology, M301 Fax: 798-5386
Baylor College of Medicine Email: bwc at bcm.tmc.edu
Houston, TX 77030
------------------------------------------------------------