LSFramework/LSString/main.cpp
DirtyDuckEUW 4f9b04c049 new file: LSList.h
new file:   LSListItem.h
	new file:   LSMacros.h
	modified:   LSString.h
	modified:   LSString.vcxproj
	new file:   LSVector.h
	modified:   main.cpp
2021-10-18 23:58:17 +02:00

53 lines
No EOL
936 B
C++

#include <iostream>
#include "LSString.h"
#include "LSList.h"
#include "Timer.h"
#define RUNS 50U
#define PAYLOAD "187"
int main()
{
// - STRING
{
printf("LSString:\n");
printf("Number of runs: %d:\n", (int)RUNS);
Timer ttt;
for (size_t zRun = 1; zRun <= RUNS; zRun++)
{
printf("Run: %2d: ", (int)zRun);
Timer tt;
LSString s("361");
for (size_t z = 0; z < RUNS * 187; z++)
{
s.Append(PAYLOAD);
}
}
}
// - LIST
{
int i1 = 1187;
int i2 = 2361;
int i3 = 3257;
int i4 = 41337;
int i5 = 569;
LSList<int> liList;
auto a1 = liList.Append(i1);
auto a2 = liList.Append(i2);
auto a3 = liList.Append(i3);
auto a4 = liList.Append(i4);
auto a5 = liList.Append(i5);
liList.Remove(i1);
liList.Remove(i5);
liList.Remove(i3);
liList.Remove(i4);
liList.Remove(i2);
liList.Remove(i1);
}
return 0;
}