[vtk-developers] Compi

Philippe P. Pebay pppebay at sandia.gov
Mon Apr 20 15:26:32 EDT 2009


Thanks Bill for having looked into it.

However, it does not resolve the performance issue:
## Completed 1000000000 push_back vs. += vs. append operations.
    Wall times:
     push_back: 4 sec.
     +=: 8 sec.
     append: 8 sec.


P.



Bill Lorensen wrote:
> Folks,
> 
> The compile errors for VS6:
> http://www.cdash.org/CDash/viewBuildError.php?buildid=316621
> 
> are easily fixed with the portable changes in the code below. I did
> run all of the InfoVis tests. I did not check in the changes because I
> can't tell if this code is covered by testing.  The current coverage
> build:
> http://www.cdash.org/CDash/index.php?project=VTK&date=2009-04-20
> does not include InfoVis.
> 
> FYI: push_back on strings is implemented as append on some stl
> implementations and clear() is implemented as erase() on Borland.
> 
> Could an InfoVis person verify that these changes are valid and please
> check them into cvs?
> 
> Thanks,
> 
> Bill
> 
> 
> void PackValues( const vtkstd::vector<vtkStdString>& values,
>                  vtkStdString& buffer )
> {
>   buffer.erase(); // equivalent to buffer.clear()
> 
>   for( vtkstd::vector<vtkStdString>::const_iterator it = values.begin();
>        it != values.end(); ++ it )
>     {
>     buffer.append( *it );
>     buffer.append(1, 0); // equilvalent to buffer.push_back( 0 )
>     }
> }
> _______________________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
> 
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtk-developers
> 
> 


-- 
Philippe Pébay
Sandia National Laboratories





More information about the vtk-developers mailing list