On 11/9/2022 6:52 AM, James Richters via fpc-pascal wrote:
Sounds to me that if the compiler will probably insert temp variables
anyway, then I might as well make my own and make it easier to
understand later.
+1
Trying to write this without intermediate variables would definitely
make is
On Wed, 9 Nov 2022, geneb via fpc-pascal wrote:
On Wed, 9 Nov 2022, DougC via fpc-pascal wrote:
Maintaining understandable and readable code is often more important that
runtime efficiency. Like others have said, there are likely many additional
places you can address overall efficiency be
On Wed, 9 Nov 2022, DougC via fpc-pascal wrote:
Maintaining understandable and readable code is often more important
that runtime efficiency. Like others have said, there are likely many
additional places you can address overall efficiency before dealing with
these calculations.
THIS. Clari
Maintaining understandable and readable code is often more important that
runtime efficiency. Like others have said, there are likely many additional
places you can address overall efficiency before dealing with these
calculations.
Doug C.
On Wed, 09 Nov 2022 09:52:12 -0500 James
Sounds to me that if the compiler will probably insert temp variables anyway,
then I might as well make my own and make it easier to understand later.
James
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-b
C-Pascal users discussions'"
Datum: 09.11.2022 13:47
Předmět: [fpc-pascal] Program efficiency
I was wondering if breaking up large complicated formulas into smaller
sections that use more variables is less efficient than just the large
formula.
In other words.. is
A:=(B+C/D)-E^F;
G:
pLimit);
__
Od: "James Richters via fpc-pascal"
Komu: "'FPC-Pascal users discussions'"
Datum: 09.11.2022 13:47
Předmět: [fpc-pascal] Program efficiency
I was wondering if breaking up large complicated formulas into smaller
sections that use more variables is less e
James Richters via fpc-pascal schrieb am
Mi., 9. Nov. 2022, 13:47:
> In other words.. is
>
> A:=(B+C/D)-E^F;
> G:=H*(I+J);
> K:=L+M/N;
> O:= A+G-K;
>
> Less efficient than
> O:= ((B+C/D)-E^F)+ (H*(I+J))-(L+M/N);
>
> Or does it end up being the same when it's done?
>
The compiler will insert temp
I was wondering if breaking up large complicated formulas into smaller
sections that use more variables is less efficient than just the large
formula.
In other words.. is
A:=(B+C/D)-E^F;
G:=H*(I+J);
K:=L+M/N;
O:= A+G-K;
Less efficient than
O:= ((B+C/D)-E^F)+ (H*(I+J))-(L+M/N);
Or does it end up