Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. processor time

processor time

Scheduled Pinned Locked Moved C / C++ / MFC
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    AbhiHcl
    wrote on last edited by
    #1

    Which one takes more processing time a. contineous if condition or switch case in while loop . e.g. while(conditon) { switch(conditon) { case contion : } codition++ } or if(condition) { } if(condition) {} if(codition) {}.... and so ono... Thanks

    A M 2 Replies Last reply
    0
    • A AbhiHcl

      Which one takes more processing time a. contineous if condition or switch case in while loop . e.g. while(conditon) { switch(conditon) { case contion : } codition++ } or if(condition) { } if(condition) {} if(codition) {}.... and so ono... Thanks

      A Offline
      A Offline
      Aescleal
      wrote on last edited by
      #2

      No idea and even if I could give you an idea it'd only be for the compiler (including settings) I tested it on and running the code on the particular configuration of computer/OS I ran it on. If you really want to know then about all you can do is test it on the computer the code's eventually going to run on. Cheers, Ash

      1 Reply Last reply
      0
      • A AbhiHcl

        Which one takes more processing time a. contineous if condition or switch case in while loop . e.g. while(conditon) { switch(conditon) { case contion : } codition++ } or if(condition) { } if(condition) {} if(codition) {}.... and so ono... Thanks

        M Offline
        M Offline
        Moak
        wrote on last edited by
        #3

        It's called profiling, a dynamic program analysis that every software engineer should know. See if it helps: CProfile - A simple class to do code profiling and tracing[^] /M

        Chat in Europe :java: Now with 24% more Twitter

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups