Thread: So, "object-oriented" programming...

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Nov 2012
    Posts
    1,393
    Quote Originally Posted by MacNilly View Post
    Programmers should not delegate "optimization" to their compilers. That's what I hate about Haskell, and love about C++.
    Really? Do you turn off optimizations when you build the final binaries of your program? For moderate sized programs it can make quite a difference in size or speed. Optimizing yourself would require knowing which machine instructions to use, allocate registers yourself, reorder instructions to get the most out of your clock cycles, etc. Even if you have the know-how, do you really want to do such optimization work by hand for the entire program?

  2. #2
    Registered User MacNilly's Avatar
    Join Date
    Oct 2005
    Location
    CA, USA
    Posts
    466
    Quote Originally Posted by c99tutorial View Post
    Really? Do you turn off optimizations when you build the final binaries of your program?cget the most out of your clock cycles, etc. Even if you have the know-how, do you really want to do such optimization work by hand for the entire program?
    I don't give a ........ about compiler optimizations... most of the ones I've studied can be had by "not being an idiot", and paying attention to the language semantics: The more simple these are, with given efficiency contracts, the more better I can develop my program, given those constraints.

    Any idiot that depends on their "compiler optimizations" is just that...

    The aforementioned things like
    get the most out of your clock cycles, etc.
    .. a waste of time
    Last edited by MacNilly; 02-13-2017 at 07:28 PM.

  3. #3
    Registered User MacNilly's Avatar
    Join Date
    Oct 2005
    Location
    CA, USA
    Posts
    466
    Quote Originally Posted by c99tutorial View Post
    Really? Do you turn off optimizations when you build the final binaries of your program? For moderate sized programs it can make quite a difference in size or speed. Optimizing yourself would require knowing which machine instructions to use, allocate registers yourself, reorder instructions to get the most out of your clock cycles, etc. Even if you have the know-how, do you really want to do such optimization work by hand for the entire program?
    Exactly. DO you think a stupid compiler can figure that out.. no, I didn't think so.

    EDiT: Hey, maybe you can write a super-efficient compiler than just does "THe Best ........ing Thing" (TM). UNtil then, STFU
    Last edited by MacNilly; 02-13-2017 at 07:32 PM.

  4. #4
    Registered User
    Join Date
    Oct 2006
    Posts
    3,445
    Quote Originally Posted by MacNilly View Post
    Exactly. DO you think a stupid compiler can figure that out.. no, I didn't think so.
    Actually, compilers are written by people who are intimately familiar with processor architectures, and yes, they can figure that out. Build a program with GCC, using only your "don't be an idiot" optimization method, with no compiler optimizations enabled. Compare its performance to the same program built with -O3. You will see that you are objectively wrong.

    Quote Originally Posted by MacNilly View Post
    EDiT: Hey, maybe you can write a super-efficient compiler than just does "THe Best ........ing Thing" (TM). UNtil then, STFU
    I doubt any of us in this thread can, but the people who write compilers are much smarter than you or I, and they know what they're doing.

    Telling someone to "STFU" when you disagree with them is not constructive, and destroys any credibility you might have had (and I'm being generous here, suggesting that you had any to begin with). It's pretty clear that you don't actually understand object oriented design and programming, or maybe even programming in general, given your attitude toward optimizing compilers. It's also clear that you're not interested in what anyone else thinks about it, as evidenced by your suggestion that people who disagree should simply "STFU." Either learn some humility, or don't ask loaded questions in places where you won't like the answers.
    What can this strange device be?
    When I touch it, it gives forth a sound
    It's got wires that vibrate and give music
    What can this thing be that I found?

  5. #5
    Registered User MacNilly's Avatar
    Join Date
    Oct 2005
    Location
    CA, USA
    Posts
    466
    You're right... I apologize. To Elkvis and c99tutorial. I hope you will accept it.

    Maybe somebody should close the thread, I seemed to have botched it.
    Last edited by MacNilly; 02-14-2017 at 03:06 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 12-08-2014, 08:12 PM
  2. Replies: 9
    Last Post: 09-19-2011, 03:12 AM
  3. "itoa"-"_itoa" , "inp"-"_inp", Why some functions have "
    By L.O.K. in forum Windows Programming
    Replies: 5
    Last Post: 12-08-2002, 08:25 AM
  4. "CWnd"-"HWnd","CBitmap"-"HBitmap"...., What is mean by "
    By L.O.K. in forum Windows Programming
    Replies: 2
    Last Post: 12-04-2002, 07:59 AM
  5. "Object reference not set to an instance of an object"
    By Manitoadlet in forum C++ Programming
    Replies: 6
    Last Post: 09-10-2002, 06:09 PM

Tags for this Thread