Do you have any C++ question? I will try to answer it.
-
-
Replying to @hankadusikova
Is there an upcoming way to properly promise compilers that memory will not change within some region? Const doesn't do the trick in most situations. What is the state of compile time introspection? Any chance to see that in the next revision?
1 reply 0 retweets 1 like -
Replying to @AndresFreundTec
You need to elaborate more about the const not doing the trick. Introspection is on its track and all stakeholders are hoping for 23.
2 replies 0 retweets 2 likes -
Replying to @hankadusikova
Well, const doesn't guarantee that there's no other non-const pointers that could also modify the memory. It's also legal to cast const away if the underlying memory wasn't constant. So it doesn't really help the compiler to recognize the compiler to realize memory won't change.
2 replies 0 retweets 1 like -
Replying to @AndresFreundTec @hankadusikova
Sometimes escape analysis, strict aliasing, restrict etc can get the job done, but it's unreliable as hell. I often see hotspots in profiles dereferencing multiple levels of pointers repeatedly, just because of an intermittent function call.
2 replies 0 retweets 1 like
Often one can (and I do) manually optimize such things by copying to local variables, but often that requires breaking abstraction layers etc. Whereas a way to tell the compiler that variable contents won't change would be a lot easier.
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.