mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
.benchmarks
git-svn-id: svn://ultimatepp.org/upp/trunk@14435 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
0210e8cd2a
commit
ad1cd09d10
3 changed files with 36 additions and 0 deletions
21
benchmarks/StreamGet32/StreamGet32.cpp
Normal file
21
benchmarks/StreamGet32/StreamGet32.cpp
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#include <Core/Core.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
dword qqq;
|
||||
|
||||
CONSOLE_APP_MAIN
|
||||
{
|
||||
String s;
|
||||
for(int i = 0; i < 1000000; i++)
|
||||
s.Cat(i);
|
||||
|
||||
for(int i = 0; i < 100; i++) {
|
||||
StringStream ss(s);
|
||||
RTIMING("Time");
|
||||
int q = 0;
|
||||
while(!ss.IsEof())
|
||||
q += ss.Get32();
|
||||
qqq += q;
|
||||
}
|
||||
}
|
||||
9
benchmarks/StreamGet32/StreamGet32.upp
Normal file
9
benchmarks/StreamGet32/StreamGet32.upp
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
uses
|
||||
Core;
|
||||
|
||||
file
|
||||
StreamGet32.cpp;
|
||||
|
||||
mainconfig
|
||||
"" = "";
|
||||
|
||||
|
|
@ -17,6 +17,12 @@ CONSOLE_APP_MAIN
|
|||
#endif
|
||||
#ifdef CPP_11
|
||||
RLOG("CPP_11");
|
||||
#endif
|
||||
#ifdef CPU_X86
|
||||
RLOG("CPU_X86");
|
||||
#endif
|
||||
#ifdef CPU_ARM
|
||||
RLOG("CPU_ARM");
|
||||
#endif
|
||||
RLOG("========================");
|
||||
RDUMP(sizeof(bool));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue