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
Sorry, it was copy-paste from github and it broke formatting
do {
v1 = XXH32_round(v1, XXH_get32bits(input)); input += 4;
v2 = XXH32_round(v2, XXH_get32bits(input)); input += 4;
v3 = XXH32_round(v3, XXH_get32bits(input)); input += 4;
v4 = XXH32_round(v4, XXH_get32bits(inp
Hi,
I noticed this too a few years ago when I translated xxHash from C to FPC.
Pushing the code to less lines improved speed so xxHash32 was as fast as in C.
do { v1 = XXH32_round(v1, XXH_get32bits(input)); input += 4; v2 = XXH32_round(v2,
XXH_get32bits(input)); input += 4; v3 = XXH32_round(v
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