On 10/14/2016 07:51 AM, Johan Engelen wrote:
On Friday, 14 October 2016 at 11:17:55 UTC, Andrei Alexandrescu wrote:
On 10/14/2016 05:24 AM, Johan Engelen wrote:
I like "hints".
How many other hints are out there? -- Andrei
Things that come to mind:
- this value is probably X (bool, int, pointer)
These would be all covered by __builtin_expect or similar.
- this type is probably Y
- this function is likely hot/cold (UDA)
- this data is likely to be accessed soon (_could_ lead to a prefetch)
- this member field is hot/cold (iirc, Class members may be re-ordered)
Any of these present in existing implementations?