From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fc89c,f8f184f3bc3517df X-Google-Attributes: gidfc89c,public X-Google-Thread: f678f,f8f184f3bc3517df X-Google-Attributes: gidf678f,public X-Google-Thread: 1094ba,f8f184f3bc3517df X-Google-Attributes: gid1094ba,public From: Nick Wagg Subject: Re: a**2 or a*a Date: 1998/01/15 Message-ID: <34BDD22D.B43@lsl.co.uk>#1/1 X-Deja-AN: 316128258 Content-Transfer-Encoding: 7bit References: <34BCC4A4.F27A00D1@cranfield.ac.uk> Content-Type: text/plain; charset=us-ascii Organization: Laser-Scan Ltd. Mime-Version: 1.0 Newsgroups: comp.lang.fortran,comp.unix.osf.misc,comp.unix.programmer Yon Han CHONG wrote: > > Is there speed difference between a**2 and a*a. > The difference is unlikely to be considerable these days but experiment to find out. It is possible that the former case invokes a function to evaluate the expression and which would probably be slower - a quick examination of generated assembly code or of a compilation listing should indicate whether a function is called. -- Nick Wagg <>< (mailto:nickw@lsl.co.uk) Laser-Scan Ltd, Senior Software Engineer Science Park, Milton Rd, Tel: +44(0)1223 420414 (ext 213) Cambridge, CB4 4FY, UK. Fax: +44(0)1223 420044 http://www.lsl.co.uk/