Map and unordered_ Map horizontal and vertical tests, with original data and test procedures

Time:2021-11-24

When writing programs, you are faced with using map or unordered_ Map is always tangled, so I wrote a program to test

Map and unordered_ Map horizontal and vertical tests, with original data and test procedures

to configure

parts information
CPU Intel® Pentium(R) CPU G3260 @ 3.30GHz × 2
Memory 7.6 GiB
system Ubuntu 20.04.1 LTS
compiler g++-9
Compile options -O2

Simple data (4 bytes)

First, a set of small data

Test items Data range Time (US)
Map write 1000 94
——Map read 1000 62
unordered_ Map write 1000 101
——unordered_ Map read 1000 61

You can see that map is dominant when the data is small

Another set of medium data

Test items Data range Time (US)
Map write 10000 1682
——Map read 10000 2703
unordered_ Map write 10000 1160
——unordered_ Map read 10000 677

Greater than 1000 is unordered_ Map has more advantages

What is the case with very large data

Test items Data range Time (US)
Map write 1000000 855782
——Map read 1000000 811670
unordered_ Map write 1000000 267515
——unordered_ Map read 1000000 118495

Big data is unordered_ mapComplete rolling

Complex data (32 byte)

One might say that when the data is complex, it is unordered_ Map is prone to conflict

Test items Data range Time (US)
Map write 10000 4064
——Map read 10000 4569
unordered_ Map write 10000 2139
——unordered_ Map read 10000 1716

Compared with the above, it is found that when the data becomes more complex, the map is worse than unordered_ Map

Overload and function speed

In addition, the test also found that whether writing or reading, using overloaded methods is slower than functions, and reading is more slow.

Test items Data range Time (US)
Map reload write 1000000 906477
——Map overload read 1000000 1115637
Map function write 1000000 855782
——Map function reading 1000000 811670
Test items Data range Time (US)
unordered_ Map overload write 1000000 284470
——unordered_ Map overload read 1000000 276208
unordered_ Map function write 1000000 267515
——unordered_ Map function read 1000000 118495

summary

According to the above data, it can be analyzed that

When the data is less than 1000, you can take map. When it is greater than 1000 and less than 10000, if sorting is required, select map and unordered if not required_ map。 If it is greater than 10000, there is no special requirement, and map is adopted.

In addition, insert and read, if anytimeJust need,Functions should be used instead of overloading

Raw data and test procedures

If someone needs raw data, you can look at it.

int 4

map

operator

#include 
#include 
#include 
#include 
using namespace std;

int main()
{
    int start = 0;

    for (int i = 1; i <= 10000; i++)
        rand();

    for (int n = 1; n <= 1e6; n *= 10)
        for (int m = 1; m <= 1e6; m *= 10)
        {
            map M;
            srand(233);
            start = clock();
            for (int i = 1; i <= n; i++)
                M[rand()] = rand();
            cout << "|Writing spends |" << clock() - start << '|' << n << '|' << m << '|' << endl;
            start = clock();
            int temp;
            for (int i = 1; i <= m; i++)
                M[rand()];
            cout << "|Reading spends |" << clock() - start << '|' << n << '|' << m << '|' << endl;
        }
    return 0;
}
project Time (microseconds) Write times Read times
Writing spends 26 1 1
Reading spends 3 1 1
Writing spends 1 1 10
Reading spends 2 1 10
Writing spends 0 1 100
Reading spends 15 1 100
Writing spends 1 1 1000
Reading spends 134 1 1000
Writing spends 2 1 10000
Reading spends 1781 1 10000
Writing spends 4 1 100000
Reading spends 48145 1 100000
Writing spends 7 1 1000000
Reading spends 823069 1 1000000
Writing spends 7 10 1
Reading spends 1 10 1
Writing spends 1 10 10
Reading spends 2 10 10
Writing spends 1 10 100
Reading spends 13 10 100
Writing spends 1 10 1000
Reading spends 217 10 1000
Writing spends 2 10 10000
Reading spends 2971 10 10000
Writing spends 5 10 100000
Reading spends 119565 10 100000
Writing spends 9 10 1000000
Reading spends 947049 10 1000000
Writing spends 18 100 1
Reading spends 1 100 1
Writing spends 10 100 10
Reading spends 2 100 10
Writing spends 9 100 100
Reading spends 17 100 100
Writing spends 8 100 1000
Reading spends 231 100 1000
Writing spends 11 100 10000
Reading spends 3457 100 10000
Writing spends 14 100 100000
Reading spends 86540 100 100000
Writing spends 24 100 1000000
Reading spends 1350311 100 1000000
Writing spends 166 1000 1
Reading spends 2 1000 1
Writing spends 147 1000 10
Reading spends 3 1000 10
Writing spends 133 1000 100
Reading spends 24 1000 100
Writing spends 132 1000 1000
Reading spends 245 1000 1000
Writing spends 143 1000 10000
Reading spends 3755 1000 10000
Writing spends 200 1000 100000
Reading spends 115802 1000 100000
Writing spends 219 1000 1000000
Reading spends 950769 1000 1000000
Writing spends 2963 10000 1
Reading spends 1 10000 1
Writing spends 2988 10000 10
Reading spends 6 10000 10
Writing spends 2905 10000 100
Reading spends 43 10000 100
Writing spends 4573 10000 1000
Reading spends 1448 10000 1000
Writing spends 3492 10000 10000
Reading spends 12881 10000 10000
Writing spends 2880 10000 100000
Reading spends 101483 10000 100000
Writing spends 2951 10000 1000000
Reading spends 935608 10000 1000000
Writing spends 49535 100000 1
Reading spends 2 100000 1
Writing spends 70612 100000 10
Reading spends 8 100000 10
Writing spends 76232 100000 100
Reading spends 76 100000 100
Writing spends 80457 100000 1000
Reading spends 790 100000 1000
Writing spends 84432 100000 10000
Reading spends 9677 100000 10000
Writing spends 78376 100000 100000
Reading spends 97320 100000 100000
Writing spends 69574 100000 1000000
Reading spends 965508 100000 1000000
Writing spends 903613 1000000 1
Reading spends 3 1000000 1
Writing spends 907309 1000000 10
Reading spends 12 1000000 10
Writing spends 916617 1000000 100
Reading spends 119 1000000 100
Writing spends 917360 1000000 1000
Reading spends 1177 1000000 1000
Writing spends 904860 1000000 10000
Reading spends 12960 1000000 10000
Writing spends 905297 1000000 100000
Reading spends 127472 1000000 100000
Writing spends 906477 1000000 1000000
Reading spends 1115637 1000000 1000000

insert & find

#include 
#include 
#include 
#include 
using namespace std;

int main()
{
    int start = 0;

    for (int i = 1; i <= 10000; i++)
        rand();

    for (int n = 1; n <= 1e6; n *= 10)
        for (int m = 1; m <= 1e6; m *= 10)
        {
            map M;
            srand(233);
            start = clock();
            for (int i = 1; i <= n; i++)
                M.insert(make_pair(rand(), rand()));
            cout << "|Writing spends |" << clock() - start << '|' << n << '|' << m << '|' << endl;
            start = clock();
            int temp;
            for (int i = 1; i <= m; i++)
                M.find(rand());
            cout << "|Reading spends |" << clock() - start << '|' << n << '|' << m << '|' << endl;
        }
    return 0;
}
project Time (microseconds) Write times Read times
Writing spends 26 1 1
Reading spends 1 1 1
Writing spends 1 1 10
Reading spends 1 1 10
Writing spends 0 1 100
Reading spends 2 1 100
Writing spends 0 1 1000
Reading spends 12 1 1000
Writing spends 1 1 10000
Reading spends 109 1 10000
Writing spends 1 1 100000
Reading spends 1086 1 100000
Writing spends 1 1 1000000
Reading spends 10757 1 1000000
Writing spends 3 10 1
Reading spends 1 10 1
Writing spends 2 10 10
Reading spends 1 10 10
Writing spends 1 10 100
Reading spends 3 10 100
Writing spends 1 10 1000
Reading spends 19 10 1000
Writing spends 1 10 10000
Reading spends 187 10 10000
Writing spends 1 10 100000
Reading spends 1813 10 100000
Writing spends 2 10 1000000
Reading spends 18350 10 1000000
Writing spends 19 100 1
Reading spends 4 100 1
Writing spends 12 100 10
Reading spends 1 100 10
Writing spends 7 100 100
Reading spends 5 100 100
Writing spends 7 100 1000
Reading spends 37 100 1000
Writing spends 7 100 10000
Reading spends 367 100 10000
Writing spends 11 100 100000
Reading spends 3599 100 100000
Writing spends 11 100 1000000
Reading spends 35590 100 1000000
Writing spends 259 1000 1
Reading spends 2 1000 1
Writing spends 107 1000 10
Reading spends 2 1000 10
Writing spends 99 1000 100
Reading spends 9 1000 100
Writing spends 94 1000 1000
Reading spends 62 1000 1000
Writing spends 95 1000 10000
Reading spends 565 1000 10000
Writing spends 99 1000 100000
Reading spends 5584 1000 100000
Writing spends 101 1000 1000000
Reading spends 55971 1000 1000000
Writing spends 1732 10000 1
Reading spends 1 10000 1
Writing spends 2230 10000 10
Reading spends 4 10000 10
Writing spends 2644 10000 100
Reading spends 28 10000 100
Writing spends 1633 10000 1000
Reading spends 188 10000 1000
Writing spends 1682 10000 10000
Reading spends 2703 10000 10000
Writing spends 1638 10000 100000
Reading spends 14327 10000 100000
Writing spends 1546 10000 1000000
Reading spends 142330 10000 1000000
Writing spends 67350 100000 1
Reading spends 2 100000 1
Writing spends 69654 100000 10
Reading spends 4 100000 10
Writing spends 64137 100000 100
Reading spends 39 100000 100
Writing spends 67940 100000 1000
Reading spends 436 100000 1000
Writing spends 63069 100000 10000
Reading spends 4709 100000 10000
Writing spends 86477 100000 100000
Reading spends 64116 100000 100000
Writing spends 67929 100000 1000000
Reading spends 370789 100000 1000000
Writing spends 768626 1000000 1
Reading spends 2 1000000 1
Writing spends 850479 1000000 10
Reading spends 12 1000000 10
Writing spends 857980 1000000 100
Reading spends 84 1000000 100
Writing spends 854080 1000000 1000
Reading spends 899 1000000 1000
Writing spends 856615 1000000 10000
Reading spends 9960 1000000 10000
Writing spends 871467 1000000 100000
Reading spends 111029 1000000 100000
Writing spends 855782 1000000 1000000
Reading spends 811670 1000000 1000000

unordered_map

operator

#include 
#include 
#include 
#include 
using namespace std;
using namespace tr1;

int main()
{
    int start = 0;

    for (int i = 1; i <= 10000; i++)
        rand();

    for (int n = 1; n <= 1e6; n *= 10)
        for (int m = 1; m <= 1e6; m *= 10)
        {
            unordered_map M;
            srand(233);
            start = clock();
            for (int i = 1; i <= n; i++)
                M[rand()] = rand();
            cout << "|Writing spends |" << clock() - start << '|' << n << '|' << m << '|' << endl;
            start = clock();
            int temp;
            for (int i = 1; i <= m; i++)
                M[rand()];
            cout << "|Reading spends |" << clock() - start << '|' << n << '|' << m << '|' << endl;
        }
    return 0;
}
project Time (microseconds) Write times Read times
Writing spends 22 1 1
Reading spends 3 1 1
Writing spends 1 1 10
Reading spends 2 1 10
Writing spends 1 1 100
Reading spends 15 1 100
Writing spends 2 1 1000
Reading spends 98 1 1000
Writing spends 2 1 10000
Reading spends 973 1 10000
Writing spends 2 1 100000
Reading spends 18905 1 100000
Writing spends 7 1 1000000
Reading spends 304928 1 1000000
Writing spends 6 10 1
Reading spends 0 10 1
Writing spends 1 10 10
Reading spends 2 10 10
Writing spends 1 10 100
Reading spends 211558 10 100
Writing spends 2 10 1000
Reading spends 83 10 1000
Writing spends 1 10 10000
Reading spends 816 10 10000
Writing spends 2 10 100000
Reading spends 18775 10 100000
Writing spends 9 10 1000000
Reading spends 331476 10 1000000
Writing spends 18 100 1
Reading spends 1 100 1
Writing spends 10 100 10
Reading spends 2 100 10
Writing spends 9 100 100
Reading spends 10 100 100
Writing spends 10 100 1000
Reading spends 84 100 1000
Writing spends 21 100 10000
Reading spends 856 100 10000
Writing spends 16 100 100000
Reading spends 19406 100 100000
Writing spends 20 100 1000000
Reading spends 344753 100 1000000
Writing spends 93 1000 1
Reading spends 1 1000 1
Writing spends 98 1000 10
Reading spends 1 1000 10
Writing spends 95 1000 100
Reading spends 5 1000 100
Writing spends 94 1000 1000
Reading spends 81 1000 1000
Writing spends 106 1000 10000
Reading spends 749 1000 10000
Writing spends 97 1000 100000
Reading spends 20981 1000 100000
Writing spends 110 1000 1000000
Reading spends 330149 1000 1000000
Writing spends 858 10000 1
Reading spends 1 10000 1
Writing spends 858 10000 10
Reading spends 1 10000 10
Writing spends 837 10000 100
Reading spends 7 10000 100
Writing spends 841 10000 1000
Reading spends 59 10000 1000
Writing spends 850 10000 10000
Reading spends 950 10000 10000
Writing spends 849 10000 100000
Reading spends 27480 10000 100000
Writing spends 919 10000 1000000
Reading spends 338245 10000 1000000
Writing spends 33755 100000 1
Reading spends 1 100000 1
Writing spends 29546 100000 10
Reading spends 3 100000 10
Writing spends 31192 100000 100
Reading spends 97 100000 100
Writing spends 30126 100000 1000
Reading spends 216 100000 1000
Writing spends 37193 100000 10000
Reading spends 1996 100000 10000
Writing spends 32065 100000 100000
Reading spends 39717 100000 100000
Writing spends 17520 100000 1000000
Reading spends 473755 100000 1000000
Writing spends 480733 1000000 1
Reading spends 2 1000000 1
Writing spends 345884 1000000 10
Reading spends 44 1000000 10
Writing spends 284269 1000000 100
Reading spends 24 1000000 100
Writing spends 283844 1000000 1000
Reading spends 223 1000000 1000
Writing spends 278945 1000000 10000
Reading spends 2068 1000000 10000
Writing spends 280158 1000000 100000
Reading spends 189937 1000000 100000
Writing spends 284470 1000000 1000000
Reading spends 376208 1000000 1000000

insert & find

#include 
#include 
#include 
#include 
using namespace std;
using namespace tr1;

int main()
{
    int start = 0;

    for (int i = 1; i <= 10000; i++)
        rand();

    for (int n = 1; n <= 1e6; n *= 10)
        for (int m = 1; m <= 1e6; m *= 10)
        {
            unordered_map M;
            srand(233);
            start = clock();
            for (int i = 1; i <= n; i++)
                M.insert(make_pair(rand(), rand()));
            cout << "|Writing spends |" << clock() - start << '|' << n << '|' << m << '|' << endl;
            start = clock();
            int temp;
            for (int i = 1; i <= m; i++)
                M.find(rand());
            cout << "|Reading spends |" << clock() - start << '|' << n << '|' << m << '|' << endl;
        }
    return 0;
}
project Time (microseconds) Write times Read times
Writing spends 24 1 1
Reading spends 1 1 1
Writing spends 1 1 10
Reading spends 1 1 10
Writing spends 1 1 100
Reading spends 2 1 100
Writing spends 1 1 1000
Reading spends 18 1 1000
Writing spends 1 1 10000
Reading spends 174 1 10000
Writing spends 1 1 100000
Reading spends 1720 1 100000
Writing spends 1 1 1000000
Reading spends 17160 1 1000000
Writing spends 2 10 1
Reading spends 1 10 1
Writing spends 1 10 10
Reading spends 1 10 10
Writing spends 1 10 100
Reading spends 4 10 100
Writing spends 1 10 1000
Reading spends 25 10 1000
Writing spends 1 10 10000
Reading spends 238 10 10000
Writing spends 1 10 100000
Reading spends 2361 10 100000
Writing spends 1 10 1000000
Reading spends 23766 10 1000000
Writing spends 18 100 1
Reading spends 6 100 1
Writing spends 12 100 10
Reading spends 4 100 10
Writing spends 13 100 100
Reading spends 13 100 100
Writing spends 17 100 1000
Reading spends 45 100 1000
Writing spends 14 100 10000
Reading spends 251 100 10000
Writing spends 12 100 100000
Reading spends 2390 100 100000
Writing spends 12 100 1000000
Reading spends 24286 100 1000000
Writing spends 126 1000 1
Reading spends 1 1000 1
Writing spends 98 1000 10
Reading spends 1 1000 10
Writing spends 93 1000 100
Reading spends 3 1000 100
Writing spends 101 1000 1000
Reading spends 61 1000 1000
Writing spends 104 1000 10000
Reading spends 259 1000 10000
Writing spends 97 1000 100000
Reading spends 2492 1000 100000
Writing spends 96 1000 1000000
Reading spends 25507 1000 1000000
Writing spends 1587 10000 1
Reading spends 1 10000 1
Writing spends 1013 10000 10
Reading spends 1 10000 10
Writing spends 823 10000 100
Reading spends 8 10000 100
Writing spends 840 10000 1000
Reading spends 54 10000 1000
Writing spends 1160 10000 10000
Reading spends 677 10000 10000
Writing spends 813 10000 100000
Reading spends 4968 10000 100000
Writing spends 808 10000 1000000
Reading spends 38649 10000 1000000
Writing spends 28790 100000 1
Reading spends 11 100000 1
Writing spends 45300 100000 10
Reading spends 5 100000 10
Writing spends 34463 100000 100
Reading spends 14 100000 100
Writing spends 35388 100000 1000
Reading spends 113 100000 1000
Writing spends 32767 100000 10000
Reading spends 2677 100000 10000
Writing spends 31524 100000 100000
Reading spends 13741 100000 100000
Writing spends 33473 100000 1000000
Reading spends 100586 100000 1000000
Writing spends 300962 1000000 1
Reading spends 1 1000000 1
Writing spends 442759 1000000 10
Reading spends 2 1000000 10
Writing spends 270830 1000000 100
Reading spends 10 1000000 100
Writing spends 270029 1000000 1000
Reading spends 124 1000000 1000
Writing spends 268652 1000000 10000
Reading spends 1192 1000000 10000
Writing spends 269445 1000000 100000
Reading spends 12717 1000000 100000
Writing spends 267515 1000000 1000000
Reading spends 118495 1000000 1000000

Btye 32

map

#include 
#include 
#include 
#include 
using namespace std;

inline __uint128_t rand128()
{
    return rand() | ((__uint128_t)rand() << 32) | ((__uint128_t)rand() << 64) | ((__uint128_t)rand() << 96);
}

int main()
{
    int start = 0;

    for (int i = 1; i <= 10000; i++)
        rand();

    for (int n = 1; n <= 1e6; n *= 10)
        for (int m = 1; m <= 1e6; m *= 10)
        {
            map, int> M;
            srand(233);
            start = clock();
            for (int i = 1; i <= n; i++)
                M.insert(make_pair(make_pair(rand128(), rand128()), rand()));
            cout << "|Writing spends |" << clock() - start << '|' << n << '|' << m << '|' << endl;
            start = clock();
            int temp;
            for (int i = 1; i <= m; i++)
                M.find(make_pair(rand128(), rand128()));
            cout << "|Reading spends |" << clock() - start << '|' << n << '|' << m << '|' << endl;
        }
    return 0;
}
project Time (microseconds) Write times Read times
Writing spends 24 1 1
Reading spends 0 1 1
Writing spends 1 1 10
Reading spends 2 1 10
Writing spends 1 1 100
Reading spends 9 1 100
Writing spends 1 1 1000
Reading spends 70 1 1000
Writing spends 1 1 10000
Reading spends 693 1 10000
Writing spends 1 1 100000
Reading spends 7061 1 100000
Writing spends 2 1 1000000
Reading spends 70166 1 1000000
Writing spends 4 10 1
Reading spends 1 10 1
Writing spends 3 10 10
Reading spends 2 10 10
Writing spends 1 10 100
Reading spends 9 10 100
Writing spends 1 10 1000
Reading spends 83 10 1000
Writing spends 2 10 10000
Reading spends 802 10 10000
Writing spends 2 10 100000
Reading spends 7936 10 100000
Writing spends 3 10 1000000
Reading spends 81096 10 1000000
Writing spends 26 100 1
Reading spends 2 100 1
Writing spends 18 100 10
Reading spends 3 100 10
Writing spends 18 100 100
Reading spends 13 100 100
Writing spends 18 100 1000
Reading spends 103 100 1000
Writing spends 17 100 10000
Reading spends 996 100 10000
Writing spends 20 100 100000
Reading spends 9949 100 100000
Writing spends 19 100 1000000
Reading spends 100397 100 1000000
Writing spends 226 1000 1
Reading spends 1 1000 1
Writing spends 166 1000 10
Reading spends 3 1000 10
Writing spends 164 1000 100
Reading spends 15 1000 100
Writing spends 164 1000 1000
Reading spends 133 1000 1000
Writing spends 167 1000 10000
Reading spends 1278 1000 10000
Writing spends 168 1000 100000
Reading spends 12895 1000 100000
Writing spends 174 1000 1000000
Reading spends 127273 1000 1000000
Writing spends 2917 10000 1
Reading spends 2 10000 1
Writing spends 2730 10000 10
Reading spends 4 10000 10
Writing spends 3344 10000 100
Reading spends 36 10000 100
Writing spends 5555 10000 1000
Reading spends 670 10000 1000
Writing spends 4300 10000 10000
Reading spends 4064 10000 10000
Writing spends 4569 10000 100000
Reading spends 35972 10000 100000
Writing spends 3696 10000 1000000
Reading spends 235334 10000 1000000
Writing spends 80213 100000 1
Reading spends 1 100000 1
Writing spends 75975 100000 10
Reading spends 7 100000 10
Writing spends 72787 100000 100
Reading spends 61 100000 100
Writing spends 72727 100000 1000
Reading spends 620 100000 1000
Writing spends 78175 100000 10000
Reading spends 6618 100000 10000
Writing spends 85278 100000 100000
Reading spends 74804 100000 100000
Writing spends 69928 100000 1000000
Reading spends 541858 100000 1000000
Writing spends 937039 1000000 1
Reading spends 2 1000000 1
Writing spends 996383 1000000 10
Reading spends 12 1000000 10
Writing spends 997665 1000000 100
Reading spends 116 1000000 100
Writing spends 1001405 1000000 1000
Reading spends 1115 1000000 1000
Writing spends 994444 1000000 10000
Reading spends 11241 1000000 10000
Writing spends 1009323 1000000 100000
Reading spends 126125 1000000 100000
Writing spends 998410 1000000 1000000
Reading spends 1002439 1000000 1000000

unordered_map

#include 
#include 
#include 
#include 
#include 
using namespace std;
using namespace tr1;

struct hashfunc
{
    inline size_t operator()(const pair &i) const
    {
        return tr1::hash()((long long)i.first) ^ tr1::hash()((long long)(i.first >> 64)) ^ tr1::hash()((long long)i.second) ^ tr1::hash()((long long)(i.second >> 64));
    }
};

inline __uint128_t rand128()
{
    return rand() | ((__uint128_t)rand() << 32) | ((__uint128_t)rand() << 64) | ((__uint128_t)rand() << 96);
}

int main()
{
    int start = 0;

    for (int i = 1; i <= 10000; i++)
        rand();

    for (int n = 1; n <= 1e6; n *= 10)
        for (int m = 1; m <= 1e6; m *= 10)
        {
            unordered_map, int, hashfunc> M;
            srand(233);
            start = clock();
            for (int i = 1; i <= n; i++)
                M.insert(make_pair(make_pair(rand128(), rand128()), rand()));
            cout << "|Writing spends |" << clock() - start << '|' << n << '|' << m << '|' << endl;
            start = clock();
            int temp;
            for (int i = 1; i <= m; i++)
                M.find(make_pair(rand128(), rand128()));
            cout << "|Reading spends |" << clock() - start << '|' << n << '|' << m << '|' << endl;
        }
    return 0;
}
project Time (microseconds) Write times Read times
Writing spends 21 1 1
Reading spends 2 1 1
Writing spends 1 1 10
Reading spends 1 1 10
Writing spends 1 1 100
Reading spends 9 1 100
Writing spends 1 1 1000
Reading spends 76 1 1000
Writing spends 1 1 10000
Reading spends 744 1 10000
Writing spends 1 1 100000
Reading spends 7466 1 100000
Writing spends 2 1 1000000
Reading spends 74453 1 1000000
Writing spends 3 10 1
Reading spends 0 10 1
Writing spends 2 10 10
Reading spends 2 10 10
Writing spends 2 10 100
Reading spends 9 10 100
Writing spends 2 10 1000
Reading spends 85 10 1000
Writing spends 2 10 10000
Reading spends 836 10 10000
Writing spends 1 10 100000
Reading spends 8370 10 100000
Writing spends 2 10 1000000
Reading spends 84176 10 1000000
Writing spends 27 100 1
Reading spends 1 100 1
Writing spends 17 100 10
Reading spends 2 100 10
Writing spends 15 100 100
Reading spends 9 100 100
Writing spends 14 100 1000
Reading spends 83 100 1000
Writing spends 14 100 10000
Reading spends 825 100 10000
Writing spends 15 100 100000
Reading spends 8127 100 100000
Writing spends 20 100 1000000
Reading spends 81937 100 1000000
Writing spends 211 1000 1
Reading spends 1 1000 1
Writing spends 164 1000 10
Reading spends 2 1000 10
Writing spends 143 1000 100
Reading spends 9 1000 100
Writing spends 160 1000 1000
Reading spends 84 1000 1000
Writing spends 144 1000 10000
Reading spends 839 1000 10000
Writing spends 161 1000 100000
Reading spends 8344 1000 100000
Writing spends 161 1000 1000000
Reading spends 84518 1000 1000000
Writing spends 2609 10000 1
Reading spends 1 10000 1
Writing spends 2341 10000 10
Reading spends 8 10000 10
Writing spends 1959 10000 100
Reading spends 18 10000 100
Writing spends 1548 10000 1000
Reading spends 193 10000 1000
Writing spends 2139 10000 10000
Reading spends 1716 10000 10000
Writing spends 1929 10000 100000
Reading spends 14391 10000 100000
Writing spends 1573 10000 1000000
Reading spends 128671 10000 1000000
Writing spends 37911 100000 1
Reading spends 1 100000 1
Writing spends 64046 100000 10
Reading spends 3 100000 10
Writing spends 29753 100000 100
Reading spends 18 100000 100
Writing spends 24535 100000 1000
Reading spends 211 100000 1000
Writing spends 34458 100000 10000
Reading spends 1982 100000 10000
Writing spends 41840 100000 100000
Reading spends 30702 100000 100000
Writing spends 44858 100000 1000000
Reading spends 195389 100000 1000000
Writing spends 426814 1000000 1
Reading spends 2 1000000 1
Writing spends 637874 1000000 10
Reading spends 3 1000000 10
Writing spends 405023 1000000 100
Reading spends 28 1000000 100
Writing spends 388910 1000000 1000
Reading spends 301 1000000 1000
Writing spends 402672 1000000 10000
Reading spends 2515 1000000 10000
Writing spends 393968 1000000 100000
Reading spends 29590 1000000 100000
Writing spends 395403 1000000 1000000
Reading spends 250795 1000000 1000000