Global vs. Local References
Global references may be slow
- distributed memory: overhead of a few instructions when using a global reference to access a local object
- shared memory: no performance implications
-
Solution: use local qualifier
- statically restrict references to local objects
- example: T local lv = null;
- use only in critical sections