Aliasing
xania.org
Aliasing
1–10 of 36 posts
Re: Aliasing
#2Re: Aliasing
#3Re: Aliasing
#4While it is possible to remove most aliasing performance issues in a C or C++ codebase, it is a pain to do it properly.
Re: Aliasing
#5Re: Aliasing
#6I wonder how much potential optimisation there is if we entirely drop pointer nonsense.
Re: Aliasing
#7I wonder how much potential optimisation there is if we entirely drop pointer nonsense.
Are you talking about dropping pointers as a programmer-facing programming language concept (in which case you might find Hylo and similar languages interesting), or dropping pointers from everything - programming languages, their implementations, compilers, etc. (in which case I'm not sure that's even possible)?
Re: Aliasing
#8Aliasing is no joke and currently the only reason why some arithmetic intensive code-bases still prefer Fortran even nowadays. While it is possible to remove most aliasing performance issues in a C or C++ codebase, it is a pain to do it properly.
Decades ago I was a Fortran developer and encountered a very odd bug in which the wrong values were being calculated. After a lot of investigation I tracked it down to a subroutine call in which a hard-coded zero was being passed as an argument. It turned out that in the body of that subroutine the value 4 was being assigned to that parameter for some reason. The side effect was that the value of zero because 4 for the rest of the program execution because Fortran aliases all parameters since it passes by descriptor (or at least DEC FORTRAN IV did so on RSX/11). As you can imagine, hilarity ensued.
Re: Aliasing
#9I also wrote about this a while ago: https://forwardscattering.org/post/51
Re: Aliasing
#10I wonder how much potential optimisation there is if we entirely drop pointer nonsense.
Aliasing issues is just yet another instance of C/C++ inferiority holding the industry back. C could've learnt from Fortran, but we ended up with the language we have...