Thread: When c++ returns, is it the same as a copy?

  1. #16
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,612
    This covers the part that they must have the same theoretical performance requirements. I simply don't trust an implementation to conform to that when it comes to tests.
    Well look at it this way: if they don't conform to theorectical performance requirements, your STL implementation is not standards compliant.

    To make sure the implementation is good and not some poor rip-off implementation.
    If you are capable of making such an evaluation, precisely nothing prevents you from retesting, to get your personal results.

    If someone's good implementation comes up with wildly different results, you have a point, but I just don't see why that would be. Particularly with the items being tested... why would memory management, which is only different in architecture, be a significant factor in results among STL implementations?

  2. #17
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by whiteflags View Post
    Well look at it this way: if they don't conform to theorectical performance requirements, your STL implementation is not standards compliant.
    Indeed. But we have a lot of those, don't we?
    Non-standard compliant compilers. Incomplete library implementations.
    And some libraries may still be a factor or two faster than others since constants are ignored in big-oh, which I believe the standard states their requirements in.

    If you are capable of making such an evaluation, precisely nothing prevents you from retesting, to get your personal results.
    I am way too lazy to make such a thing.
    I am merely criticizing the results. If I really wanted to have good results, then I suppose I would have to test it, since I can't just demand someone else do it.

    If someone's good implementation comes up with wildly different results, you have a point, but I just don't see why that would be. Particularly with the items being tested... why would memory management, which is only different in architecture, be a significant factor in results among STL implementations?
    And why would they not be? There is a lot of complexity there.
    Allocating, moving, keeping track of elements, cleaning up, etc.
    And then there's the big mess of allocation and deallocation which means allocators and new/delete which needs to be properly implemented.
    I'm a pessimist. I can see a lot of things go wrong.
    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. Gcc can't find obvious copy constructor
    By SevenThunders in forum C++ Programming
    Replies: 13
    Last Post: 03-19-2009, 02:41 PM
  2. How to copy a C struct to a C++ class?
    By Ptbamboo in forum C++ Programming
    Replies: 1
    Last Post: 02-21-2009, 02:11 PM
  3. Polynomials and ADT's
    By Emeighty in forum C++ Programming
    Replies: 20
    Last Post: 08-19-2008, 08:32 AM
  4. Copying constant amount of data
    By TriKri in forum C++ Programming
    Replies: 16
    Last Post: 07-12-2008, 06:32 AM
  5. Copy constructor question
    By BigFish21 in forum C++ Programming
    Replies: 9
    Last Post: 05-04-2008, 12:18 PM