Message-ID: <32F66082.33B6@post.comstar.ru> Date: Mon, 03 Feb 1997 14:02:42 -0800 From: Dim Zegebart Reply-To: zager AT post DOT comstar DOT ru Organization: zager AT post DOT comstar DOT ru MIME-Version: 1.0 To: DJGPP Mail List Subject: Using pointers ? Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi, I have small question about speed optimization. Here are two functions making the same things but different ways: int foo1(TMyType *ptr) { //TMyType has fields fld1 and fld2 both int int i; for (i=0;i<100000;i++) { ptr->fld1++; //here may be any expression. ++ just for example ptr->fld2--; } return(1); } int foo1(TMyType *ptr) { //TMyType has fields fld1 and fld2 both int int i; for (i=0;i<100000;i++) { ptr->fld1++; //here may be any expression. ++ just for example ptr->fld2--; } return(1); } -- Regards, Dim Zegebart, Moscow Russia.