Skip to content
Snippets Groups Projects
Commit 609429c1 authored by Mirar (Pontus Hagland)'s avatar Mirar (Pontus Hagland)
Browse files

these didn't really append, changing so they append (gosh, that was slow)

Rev: lib/modules/Tools.pmod/Shoot.pmod/AppendMapping.pike:1.2
Rev: lib/modules/Tools.pmod/Shoot.pmod/AppendMultiset.pike:1.2
parent 30c1e9e4
No related branches found
No related tags found
No related merge requests found
......@@ -2,8 +2,8 @@ inherit Tools.Shoot.Test;
constant name="Append mapping";
int k = 5; /* variable to tune the time of the test */
int m = 100000; /* the target size of the mapping */
int k = 10; /* variable to tune the time of the test */
int m = 1000; /* the target size of the mapping */
int n = m*k; // for reporting
void perform()
......@@ -11,9 +11,8 @@ void perform()
for (int i=0; i<k; i++)
{
mapping v=([]);
int z=i*m+m;
for (int j=i*m; j<z; j++)
v[j]=42;
for (int j=0; j<m; j++)
v|=([j:42]);
}
}
......
......@@ -2,8 +2,8 @@ inherit Tools.Shoot.Test;
constant name="Append multiset";
int k = 5; /* variable to tune the time of the test */
int m = 100000; /* the target size of the multiset */
int k = 10; /* variable to tune the time of the test */
int m = 1000; /* the target size of the multiset */
int n = m*k; // for reporting
void perform()
......@@ -11,9 +11,8 @@ void perform()
for (int i=0; i<k; i++)
{
multiset v=(<>);
int z=i*m+m;
for (int j=i*m; j<z; j++)
v[j]=42;
for (int j=0; j<m; j++)
v|=(<j>);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment