Stenzel / newshadeofpink

Recipe for generation of pink noise
90 stars 4 forks source link

register no longer has any effect on assembly #1

Open ad8e opened 3 years ago

ad8e commented 3 years ago

https://godbolt.org/z/766P7s

With clang, gcc, and MSVC, there is no change in assembly with register removed.

Stenzel commented 3 years ago

If the compiler ignores it or not, it might make the code more readable for humans.

ad8e commented 3 years ago

It doesn't ignore it in the sense of compilation output (not assembly output); gcc warns about it, and clang errors and refuses to compile. I had to silence them with compiler flags.

Stenzel commented 3 years ago

You are right, I shall remove the register. Thanks also for the godbolt code, interesting to see how good or bad compilers perform.