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. Does turning on /GS- switch make the final binary code run slower?

Does turning on /GS- switch make the final binary code run slower?

Scheduled Pinned Locked Moved C / C++ / MFC
c++securityquestionannouncementworkspace
5 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.
  • L Offline
    L Offline
    Link2600
    wrote on last edited by
    #1

    Hi all, I'm wondering if turning on the /GS- switch (that's the Buffer Security Check option, it's used to prevent Buffer Overrun) make the final binary code run slower? Environment: 1.) In pure WIN32 with C++ code. (native apps) 2.) Release build. 3.) WinXP /w SP2. Thanks.

    P 1 Reply Last reply
    0
    • L Link2600

      Hi all, I'm wondering if turning on the /GS- switch (that's the Buffer Security Check option, it's used to prevent Buffer Overrun) make the final binary code run slower? Environment: 1.) In pure WIN32 with C++ code. (native apps) 2.) Release build. 3.) WinXP /w SP2. Thanks.

      P Offline
      P Offline
      Paul Conrad
      wrote on last edited by
      #2

      Link2006 wrote:

      I'm wondering if turning on the /GS- switch (that's the Buffer Security Check option, it's used to prevent Buffer Overrun) make the final binary code run slower?

      Compile with and without the switch and then investigate...


      too much daily WTF for someone... - Anton Afanasyev

      Last modified: Monday, August 21, 2006 2:50:09 PM -- Did a test program and it made no difference in speed or size.

      L 1 Reply Last reply
      0
      • P Paul Conrad

        Link2006 wrote:

        I'm wondering if turning on the /GS- switch (that's the Buffer Security Check option, it's used to prevent Buffer Overrun) make the final binary code run slower?

        Compile with and without the switch and then investigate...


        too much daily WTF for someone... - Anton Afanasyev

        Last modified: Monday, August 21, 2006 2:50:09 PM -- Did a test program and it made no difference in speed or size.

        L Offline
        L Offline
        Link2600
        wrote on last edited by
        #3

        PaulC1972 wrote:

        Compile with and without the switch and then investigate...

        I can't tell the difference, maybe that's because both of my machines are rather fast, and my low-end PC is installed with Linux, so I can't test it on that machine. I'm going to leave that switch on for now.

        P 1 Reply Last reply
        0
        • L Link2600

          PaulC1972 wrote:

          Compile with and without the switch and then investigate...

          I can't tell the difference, maybe that's because both of my machines are rather fast, and my low-end PC is installed with Linux, so I can't test it on that machine. I'm going to leave that switch on for now.

          P Offline
          P Offline
          Paul Conrad
          wrote on last edited by
          #4

          Did you notice the modification that I had to my post. I didn't find any difference between the two executables generated with and without the switch. Speed and size were the same. Running a diff between the two executables says they differ :suss:


          too much daily WTF for someone... - Anton Afanasyev

          L 1 Reply Last reply
          0
          • P Paul Conrad

            Did you notice the modification that I had to my post. I didn't find any difference between the two executables generated with and without the switch. Speed and size were the same. Running a diff between the two executables says they differ :suss:


            too much daily WTF for someone... - Anton Afanasyev

            L Offline
            L Offline
            Link2600
            wrote on last edited by
            #5

            PaulC1972 wrote:

            Did you notice the modification that I had to my post.

            Nope, I didn't. The font is too small, I didn't notice it at first until you mentioned it.

            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