Updating ext_string for benchmark optimizations

String optimizations, this gives us a 40% reduction in cycles for the revcomp benchmark.

Differential Revision: D934224
Esse commit está contido em:
Paul Bissonnette
2013-08-19 00:35:18 -07:00
commit de Sara Golemon
commit 8eb0a830da
22 arquivos alterados com 591 adições e 266 exclusões
+3 -4
Ver Arquivo
@@ -18,6 +18,7 @@
#include "hphp/runtime/ext/ext_process.h"
#include "hphp/runtime/ext/ext_file.h"
#include "hphp/runtime/ext/ext_function.h"
#include "hphp/runtime/ext/ext_string.h"
#include "hphp/runtime/base/string-buffer.h"
#include "hphp/runtime/base/zend-string.h"
#include "hphp/runtime/base/thread-init-fini.h"
@@ -466,8 +467,7 @@ String f_exec(CStrRef command, VRefParam output /* = null */,
return String();
}
return StringUtil::Trim(lines[count - 1].toString(),
StringUtil::TrimType::Right);
return f_rtrim(lines[count - 1].toString());
}
void f_passthru(CStrRef command, VRefParam return_var /* = null */) {
@@ -514,8 +514,7 @@ String f_system(CStrRef command, VRefParam return_var /* = null */) {
return String();
}
return StringUtil::Trim(lines[count - 1].toString(),
StringUtil::TrimType::Right);
return f_rtrim(lines[count - 1].toString());
}
///////////////////////////////////////////////////////////////////////////////