Просмотр исходного кода

performance patch for (at least) tru64cxx

[SVN r24661]
Markus Schöpflin 21 лет назад
Родитель
Сommit
5991ba7758
1 измененных файлов с 3 добавлено и 0 удалено
  1. 3 0
      tools/regression/process_jam_log.cpp

+ 3 - 0
tools/regression/process_jam_log.cpp

@@ -50,6 +50,9 @@ namespace
       || src.find( "cc1plus.exe: warning:   as it has already been specified as a non-system directory" ) != string::npos
       ) return;
 
+    // on some platforms (e.g. tru64cxx) the following line is a real performance boost
+    target.reserve(src.size() * 2 + target.size());
+
     for ( string::size_type pos = 0; pos < src.size(); ++pos )
     {
       if ( src[pos] == '<' ) target += "&lt;";

粤ICP备19079148号