[vtk-developers] [vtkusers] Can we drop Visual Studio 6 support?
Timothy M. Shead
tshead at sandia.gov
Fri Apr 17 17:09:45 EDT 2009
Bill Lorensen wrote:
> Isn't a character a string of one character? Tell me the performance
> hit in a typical application.
Not if you like your strings NULL terminated :)
> Bill
>
> On Fri, Apr 17, 2009 at 4:28 PM, Philippe P. Pebay <pppebay at sandia.gov> wrote:
>> No, unfortunately it does not. It appends another string.
>> On the other hand, push_back() allows for the addition of one character at a
>> time. There is therefore less overhead. This matters when serializing
>> multiple packets prior to MPI communication.
>> VS 6.0 does not support push_back(). And as I only figured out this morning,
>> it does not support clear() either. This is annoying.
>>
>> P
>>
>> Bill Lorensen wrote:
>>> Doesn't += do that?
>>>
>>> On Fri, Apr 17, 2009 at 3:33 PM, Pebay, Philippe P <pppebay at sandia.gov>
>>> wrote:
>>>>>> Besides the big red dahsboard few weeks ago with the unicode features,
>>>>>> there is no VS60 specific break. The last few days dashboard errors
>>>>>> were on most platforms.
>>>> Yes, there is one: push_back on strings.
An alternative to std::string::push_back() is to use insert:
my_string.insert(my_string.end(), my_char);
An alternative to std::string::clear() is to use erase:
my_string.erase(my_string.begin(), my_string.end());
Neither of these is likely to introduce noticeable performance changes.
Cheers,
Tim
--
Timothy M. Shead
Data Analysis & Visualization (1424)
Sandia National Laboratories
505-284-0139
More information about the vtk-developers
mailing list