Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by temp3600

  1. temp3600

    Does factorization of code always result in speed increase ?

    Thank you for your answers! Salem, thanks for the link. Michael
  2. temp3600

    Does factorization of code always result in speed increase ?

    Thank you for your reply. I'm really interested in speed, and very little in readability and ease of maintenance. You say that an ok compiler should optimise the second (or more, i just put two in the example) comparison. But will that optimisation reach the speed obtained by factorizing the...
  3. temp3600

    Does factorization of code always result in speed increase ?

    Thank you for your answer. The code doesn't affect n's value, no. In f2, the test if(n == 3) is only done once, but some code is duplicated (blocks 01, 02 and 03) as a result. If I understand you correctly, f2 will be faster ? Michael.
  4. temp3600

    Joystick code won't compile

    Hello, I think you have a typo at the beginning of zserial.h. It should be #ifndef instead of #ifdef. I can't help you with the other error, sorry. Michael
  5. temp3600

    Does factorization of code always result in speed increase ?

    Hello, Let's say you have a function like this one : void f( int n ) { ... some code 01 ... if( n == 3 ) { ... some code Test1a ... } else { ... some code Test1b ... } ... some code 02 ... if( n == 3 ) { ... some code Test2a ... } else { ... some code...

Part and Inventory Search

Back
Top