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. compiler option

compiler option

Scheduled Pinned Locked Moved C / C++ / MFC
questionhelp
3 Posts 2 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.
  • P Offline
    P Offline
    pranavamhari
    wrote on last edited by
    #1

    hi, What is your opinion about the expand 'any suitable' function inline ? Will that cause any problem ? why does the compiler issue warnings while compiling with that option ? regards..... Hari Krishnan

    M 1 Reply Last reply
    0
    • P pranavamhari

      hi, What is your opinion about the expand 'any suitable' function inline ? Will that cause any problem ? why does the compiler issue warnings while compiling with that option ? regards..... Hari Krishnan

      M Offline
      M Offline
      Mike Dimmick
      wrote on last edited by
      #2

      'Any suitable' basically means that the compiler gets to look at every function you wrote and decide whether to inline it. Basically it tries to see whether the cost of inlining the function is more or less than the cost of not doing so - if less, it will probably inline it. The problem will likely be that your code size will be very large. Most references actually recommend trying to minimize code size in the general case, because more code = more working set = more page faults, typically. A page fault can swamp any benefit you might get from code that would be faster if it had all been in RAM at the same time. As for the warnings, I have no idea, since I've never used this option. Post a list of the warnings! :-D -- Mike Dimmick

      P 1 Reply Last reply
      0
      • M Mike Dimmick

        'Any suitable' basically means that the compiler gets to look at every function you wrote and decide whether to inline it. Basically it tries to see whether the cost of inlining the function is more or less than the cost of not doing so - if less, it will probably inline it. The problem will likely be that your code size will be very large. Most references actually recommend trying to minimize code size in the general case, because more code = more working set = more page faults, typically. A page fault can swamp any benefit you might get from code that would be faster if it had all been in RAM at the same time. As for the warnings, I have no idea, since I've never used this option. Post a list of the warnings! :-D -- Mike Dimmick

        P Offline
        P Offline
        pranavamhari
        wrote on last edited by
        #3

        thanks. i better try to minimize code size Hari Krishnan

        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