Is the compiler optimising such evaluation in case of F3 and F4 are not function of “i” ? and so for F5 and F6 are not function of “i” or “j” ?Аnd how is the compiler supposed to know this?
Is the call to List3.Count executed List1.Count*List2.Count times ?I would guess that the answer is yes.
at least in the latter code you don't have to assume anything.
... cj:= List2.Count-1; ck:= List3.Count-1; For i:=0 to List1.Count-1 do begin For j:=0 to cj do begin For k:=0 to ck do begin … End; End; End;
thanks.
Is the compiler optimising such evaluation in case of F3 and F4 are not function of “i” ? and so for F5 and F6 are not function of “i” or “j” ?Аnd how is the compiler supposed to know this?