This is the mail archive of the libstdc++@sourceware.cygnus.com mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

basic_string<>::_M_mutate - patch



One other thing... my suggestion isn't just a matter
of prettying up the code.  clone() is obliged to copy
all the characters.  Imagine a case of a string with
size() == 1000000, and called with _M_mutate(2,999996,999996).
Then, clone() must copy a million characters, but _M_mutate
need copy only four.

Nathan

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]