Advertisement
Guest User

Untitled

a guest
Mar 4th, 2015
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. int a=7,b=8,c=9,d=10;
  2.  
  3. clock_t start, stop;
  4.  
  5. char s1[7]="abc", s2[7]="xyz";
  6. cout<<add(s1,s2);
  7.  
  8. start= clock();
  9.  
  10. for(long i=0;i<10000000;i++)
  11. {
  12. fct_inline_schimb(&a,&b,&c,&d);
  13. }
  14.  
  15. stop=clock();
  16.  
  17. cout<<"\nTimpul pentru inline : "<<stop-start<<" milisecunde\n";
  18.  
  19.  
  20.  
  21. start= clock();
  22.  
  23. for(long i=0;i<10000000;i++)
  24. {
  25. fct_schimb(&a,&b,&c,&d);
  26. }
  27.  
  28. stop=clock();
  29.  
  30. cout<<"Timpul fara inline: "<<stop-start<<" milisecunde\n";
  31.  
  32. return 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement