InterviewSolution
Saved Bookmarks
| 1. |
How Does Volatile Affect Code Optimization By Compiler? |
|
Answer» Volatile is an INSTRUCTION that the VARIABLES can be accessed by multiple THREADS and hence shouldn't be cached. As volatile variables are never cached and hence their RETRIEVAL cannot be optimized. Volatile is an instruction that the variables can be accessed by multiple threads and hence shouldn't be cached. As volatile variables are never cached and hence their retrieval cannot be optimized. |
|