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
This commit is contained in:
DirtyDuckEUW 2021-10-18 23:58:17 +02:00
parent 6e22717a81
commit 4f9b04c049
7 changed files with 194 additions and 26 deletions

View file

@ -1,5 +1,6 @@
#include <iostream>
#include "LSString.h"
#include "LSList.h"
#include "Timer.h"
#define RUNS 50U
@ -7,20 +8,46 @@
int main()
{
printf("LSString:\n");
printf("Number of runs: %d:\n", (int)RUNS);
Timer ttt;
for (size_t zRun = 1; zRun <= RUNS; zRun++)
// - STRING
{
printf("Run: %2d: ", (int)zRun);
Timer tt;
LSString s("361");
for (size_t z = 0; z < RUNS * 187; z++)
printf("LSString:\n");
printf("Number of runs: %d:\n", (int)RUNS);
Timer ttt;
for (size_t zRun = 1; zRun <= RUNS; zRun++)
{
s.Append(PAYLOAD);
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;
}