Thread: I/O Rates - MBs per second - what's good?

  1. #16
    Jack of many languages Dino's Avatar
    Join Date
    Nov 2007
    Location
    Chappell Hill, Texas
    Posts
    2,332
    I have not profiled the code yet, but I did just port it to my Win XP SP2 machine on a Dell desktop 5100C, 3.1ghz machine. OMG. It ran for 2 minutes, 15 seconds (vs the 10 seconds on my Mac). Visual C++ 6.0, running with default compiler options for a Win Console Application. Ugggggg.

    Todd

  2. #17
    Jack of many languages Dino's Avatar
    Join Date
    Nov 2007
    Location
    Chappell Hill, Texas
    Posts
    2,332
    Phew.

    I set the Active Build in VC++ to Release and reran. 14 seconds. I'm OK with that!! Time to start profiling.

    Todd

  3. #18
    pwns nooblars
    Join Date
    Oct 2005
    Location
    Portland, Or
    Posts
    1,094
    Move up to a updated compiler (What ever the free version of visual studio is now, 2008 I think it is, or MinGW if you want an open source compiler) and possibly you will see better results due to advancements in the compiler optimizations themselves, also be sure you are optimizing for speed not executable size, you may be able to get a bit more out of your application that way.

  4. #19
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Default release config is "optimize for speed", not for size. For larger applications, optimize for size may actually give better results (because the code takes up less space and thus gives better cache-hit ratio). For small applications, where the executable file is less than a few hundred K, then the optimize for size is probably the "wrong" setting.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  5. #20
    Jack of many languages Dino's Avatar
    Join Date
    Nov 2007
    Location
    Chappell Hill, Texas
    Posts
    2,332
    Yes, I have Visual C++ Express downloaded and installed, but picked this since it was the first one I saw in my programs list. I haven't done any optimizing yet.

    Thanks. Todd

  6. #21
    Jack of many languages Dino's Avatar
    Join Date
    Nov 2007
    Location
    Chappell Hill, Texas
    Posts
    2,332
    The current size of the Windows .exe is 236KB. Fairly smallish.

    Todd

  7. #22
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    In your linker settings, add "/OPT:REF /OPT:NOWIN98" and make sure your linking with the DLL version of the CRT - you're app should get a lot smaller (assuming you don't need to run on 98).

    gg

  8. #23
    Jack of many languages Dino's Avatar
    Join Date
    Nov 2007
    Location
    Chappell Hill, Texas
    Posts
    2,332
    Thanks. Will look that up and add it this evening.

    Todd

  9. #24
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    I typically use Link Time Code Generation (which works with Full Optimization) to ensure best optimization (or so I would believe) and not speed nor size.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Good resources for maths and electronics
    By nickname_changed in forum A Brief History of Cprogramming.com
    Replies: 8
    Last Post: 12-22-2004, 04:23 PM
  2. Good C++ books for a begginer
    By Rare177 in forum C++ Programming
    Replies: 13
    Last Post: 06-22-2004, 04:30 PM
  3. Good sound storage method
    By VirtualAce in forum Game Programming
    Replies: 1
    Last Post: 10-14-2003, 05:18 AM
  4. linked list recursive function spaghetti
    By ... in forum C++ Programming
    Replies: 4
    Last Post: 09-02-2003, 02:53 PM
  5. Using Windows File I/O functions
    By SMurf in forum Windows Programming
    Replies: 2
    Last Post: 10-05-2001, 05:36 AM