Skip to content

Instantly share code, notes, and snippets.

@Subv
Created June 22, 2015 01:39
Show Gist options
  • Select an option

  • Save Subv/a9cc729dd445b2e61564 to your computer and use it in GitHub Desktop.

Select an option

Save Subv/a9cc729dd445b2e61564 to your computer and use it in GitHub Desktop.
[20:38:57] <Subv> walnut: { uint32_t someVar, moreVar, yetAnotherVar[200]; for(int i = 0; i < 200; ++i) yetAnotherVar[i] = i; uint8_t fileHandle[32] = {0x00}; memset(&fileHandle, 13, 32); cout << +fileHandle[30] << " ignore "; int dontOptimizeMe = 0; for(int i = 0; i < 200; ++i) dontOptimizeMe += yetAnotherVar[i]; cout << dontOptimizeMe; }
[20:38:58] <walnut> Output> 13 ignore 19900
[20:39:08] <Subv> walnut: { uint32_t someVar, moreVar, yetAnotherVar[200]; for(int i = 0; i < 200; ++i) yetAnotherVar[i] = i; uint8_t fileHandle[32] = {0x00}; memset(fileHandle, 13, 32); cout << +fileHandle[30] << " ignore "; int dontOptimizeMe = 0; for(int i = 0; i < 200; ++i) dontOptimizeMe += yetAnotherVar[i]; cout << dontOptimizeMe; }
[20:39:10] <walnut> Output> 13 ignore 19900
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment