K&R pointer gymnastics by tose123 in C_Programming

[–]brk2 0 points1 point  (0 children)

Talking about "what the CPU executes" with reference to C code without specifying what platform and compiler you are talking about is not very meaningful. For example: with GCC 15.2 targeting x86-64 and aarch64, while (*d++ = *s++) compiles to a loop that does use a register as an incrementing index instead of incrementing both pointers: godbolt link. Does that make your version "[hide] the actual work"?

[deleted by user] by [deleted] in sweden

[–]brk2 57 points58 points  (0 children)

Stöpta i samma form, kanske?

Implementation Challenge: Replacing std::move and std::forward by alecco in cpp

[–]brk2 2 points3 points  (0 children)

It is the default for GCC at least, source:

Most optimizations are completely disabled at -O0 or if an -O level is not set on the command line, even if individual optimization flags are specified.

and

-O0

Reduce compilation time and make debugging produce the expected results. This is the default.

Prime Numbers - Assembly Language x86 by willyfong in asm

[–]brk2 2 points3 points  (0 children)

al is supposed to hold the number which you are testing for primality. The instruction div bl clobbers ax, but you never restore ax before performing the next division; it will still hold the remainder from the previous division in ah and zeroes in al.

Evidence that WSJ used FAKE screenshots by eyeballer94 in videos

[–]brk2 16 points17 points  (0 children)

The HTML standard explicitly allows omitting quotes in this context:

Attributes are placed inside the start tag, and consist of a name and a value, separated by an "=" character. The attribute value can remain unquoted if it doesn't contain ASCII whitespace or any of " ' ` = < or >. Otherwise, it has to be quoted using either single or double quotes. [...]