Skip to content

Instantly share code, notes, and snippets.

@hauleth
Created March 5, 2015 10:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hauleth/c3c4d5b4cfb81ebcdb4b to your computer and use it in GitHub Desktop.
Save hauleth/c3c4d5b4cfb81ebcdb4b to your computer and use it in GitHub Desktop.
Output:
std::cout bez sync_with_stdio(0)
real 0m0.084s
user 0m0.083s
sys 0m0.000s
std::cout z sync_with_stdio(0)
real 0m0.078s
user 0m0.078s
sys 0m0.000s
printf()
real 0m0.106s
user 0m0.106s
sys 0m0.000s
Output:
std::cin bez sync_with_stdio(0)
real 0m0.016s
user 0m0.016s
sys 0m0.000s
std::cin z sync_with_stdio(0)
real 0m0.018s
user 0m0.018s
sys 0m0.000s
scanf()
test.cpp: In function ‘int main()’:
test.cpp:2:75: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
int main(){ int test; for(int i = 0; i < 1000000; i++) { scanf("%d", &i);} return 0;}
^
real 0m0.222s
user 0m0.077s
sys 0m0.145s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment