mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
28 lines
394 B
C++
28 lines
394 B
C++
#include <Core/Core.h>
|
|
|
|
using namespace Upp;
|
|
|
|
CONSOLE_APP_MAIN
|
|
{
|
|
Index<String> index;
|
|
TimeStop tm;
|
|
RTIMESTOP("Total runtime");
|
|
for(int i = 0; i < 1000000; i++) {
|
|
int x;
|
|
String q;
|
|
{
|
|
RTIMING("rand");
|
|
x = rand();
|
|
}
|
|
{
|
|
RTIMING("AsString");
|
|
q = AsString(x);
|
|
}
|
|
{
|
|
RTIMING("Index::FindAdd");
|
|
index.FindAdd(q);
|
|
}
|
|
}
|
|
RDUMP(index.GetCount());
|
|
RDUMP(tm.Elapsed());
|
|
}
|