This is a mess indeed. I'm working on a version of chacha20 that is fast yet doesn't assume aligned pointer access (or endianness).https://twitter.com/jedisct1/status/1251619911203467265 …
I feel like functions should either tag pointers as restricted, and handle them as such, or explicitly be designed to work in-place and take a single pointer.
-
-
But that is not alignment right? Restrict is about aliassing, which is also a mess of undefined behavior. I'm also in favor of adding restrict everywhere.
-
Do you consistently use it? If so, do you get complaints about it?
End of conversation
New conversation -
-
-
I remember my hesitation: it's not enforced. Like if you pass in a const pointer for a normal pointer: compile error. So if a user is unaware of the meaning of restrict, they can ignore it without "problems". So real use seems only for compiler to save a few instructions.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.