On Wed, February 1, 2017 4:49 am, Graeme Geldenhuys wrote:
> Hi,
>
>
> Just curious (been in a discussion with somebody else). Is there a
> performance difference between a FOR loop and a WHILE loop?
>
> Not sure if it will make a difference, but the usage is with three
> nested loops, iterating ov
On Thu, Feb 2, 2017 at 4:01 AM, Mark Morgan Lloyd <
markmll.fpc-pas...@telemetry.co.uk> wrote:
>
> It's interesting that the real (wallclock) and user times are consistently
> in a different sequence. /If/ the user time is to be believed, there's a
> very small advantage to counting down even if t
On 01/02/17 20:30, Nitorami wrote:
Just a note - I learned that for very short "for" loops it may be even a bit
faster to count downwards (to zero) rather than upwards if possible, because
the comparison to zero is very effiicient. Not sure though whether that
still makes a difference on modern p
Just a note - I learned that for very short "for" loops it may be even a bit
faster to count downwards (to zero) rather than upwards if possible, because
the comparison to zero is very effiicient. Not sure though whether that
still makes a difference on modern processors.
--
View this message in
Am 2017-02-01 um 12:49 schrieb Graeme Geldenhuys:
> Just curious (been in a discussion with somebody else). Is there a
> performance difference between a FOR loop and a WHILE loop?
> Not sure if it will make a difference, but the usage is with three
> nested loops, iterating over some 300,000 plus
On 2017-02-01 12:12, Mattias Gaertner wrote:
> Yes, for-loop calculates the end value only once.
Ah, thanks for that. Seems so obvious now. :)
Regards,
Graeme
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi
On Wed, 1 Feb 2017 11:49:34 +
Graeme Geldenhuys wrote:
> Hi,
>
> Just curious (been in a discussion with somebody else). Is there a
> performance difference between a FOR loop and a WHILE loop?
Yes, for-loop calculates the end value only once.
> Not sure if it will make a difference, but
Hi,
Just curious (been in a discussion with somebody else). Is there a
performance difference between a FOR loop and a WHILE loop?
Not sure if it will make a difference, but the usage is with three
nested loops, iterating over some 300,000 plus data points in total.
Regards,
Graeme
_