Author: Tony Werten
Date: 08:17:06 03/15/01
Go up one level in this thread
On March 15, 2001 at 02:18:03, Olaf Jenkner wrote: >On March 15, 2001 at 01:24:22, Steve Maughan wrote: > >>Olaf, >> >>The reason that Delphi compiles so quickly is due to the struture of the >>language and not the quality of the optimization. Best estimates show that >>Delphi is +/- 20% of the speed of VC (see www.optimalcode.com). Yes for some >>integer manipulations it is faster than VC. See also Jakes programming >>challenge where Delphi quite often beats VC. >> >>It's easy to blame the compiler - usually the problem have more to do with >>structure of the program. >> >>Steve > >A look at the generated code shows some horrible things: > >Example: if(a[i]=x)or(a[i]=y)or(a[i]=z)then ... > Delphi does not know that it can load the value > of a[i] in a register only on once. > >I think many things could be done better without a great optimization. Or change the code to tmp:=a[i]; if (tmp=x) or (tmp=y) or (tmp=z) then ... BTW the behavour of the array a[] is different depending if it's a global,local or dynamic array. So is its speed. Global dynamic is fastest if the size of the elements is a multiple of 32 bit. That's what I mean with you have to know the compiler. cheers, Tony > >OJe
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.