> Excuse me @Udiknedormin, maybe you aren't fluent in English?
This is my last warning. Watch your tone.
ave asked the question, is it a Nim or gcc ` problem`?
Since gcc, and clang, produce the same characteristic of the `problem` for the
same Nim code (at least on my Intel I7 cpu system), maybe it's something else.
I don't know. To me it's an interesting anomaly that needs fuller investigation.
@jzakiya
So you DID inspect C code differences and also checked another compiler, but
you still blame Nim, not gcc, for that time difference? Even to the point of
calling it a security issue?
> If the devs don't have even a basic level of intellectual inquisitiveness
> (pride?) to understand why this phenomena exists (and would have to
> ultimately fix it ), I don't know what more data, motivation, or incentive,
> is needed.
_Shrug_ I 'm sorry I know so much about problems like
Mr jzakiya,
this is indeed an interesting observation, and in your last post you gave a
very good description of it.
But your attitude is still a bit strange. As you already found out, Nim
generates fully valid C code, similar code as a C programmer may write. So it
is more a problem of C
In order to be taken `super, suPER, SUPER` seriously, let me be hermetically
sealed, and scientifically rigorous, in presenting this `problem`.
Base Hardware:
System76 laptop with Intel I7 6700HQ cpu, 2.6-3.5 GHz clock, 4 cores, 8
threads, 16GB of memory, and 128GB SSD.
Base OS:
Linux kernel
I guess more people would regard your post serious if you would not use terms
like "the program runs 4+ seconds slower".
What does that mean when maybe total runtime is a few hours?
And you did not tell us your CPU type and OS (32 or 64 bit), ARM, MIPS or x86
processor?
Generally, the result
I looked at the generated C code for both versions. They have exactly the same
structure (reference names are different) and exactly the same number of total
lines-of-code (loc).
Here's the C code generated for the different Nim versions snippets.
while (1) {
if
Oh by the way, the compiled code for `a[k] = 1` was 95 bytes bigger, using gcc
4.9.2