Table of Contents
|
Summary
In this article we'll talk about allocators performance. We take performance comparison of:
- AutoFreeAlloc
- ScopeAlloc
- APR Pools (Apache Portable Runtime)
- MT Allocator (GNU C++)
- Boost Pool (boost::pool)
- Boost ObjectPool (boost::object_pool)
- NewDelete (new/delete)
Because most of allocators focus to improve performance of small objects allocation, we only test to allocate small objects here.
Test Cases
Assume our task is to allocate 1000,000 integer objects. If each allocator allocates one integer object, we need 1000,000 allocators. If each allocator allocates 1000 integer objects, we need 1000 allocators. And if each allocator allocate 1000,000 integer objects, we only need one allocator. Our pseudo test code is like this:
for (int j = 0; j < NAlloc; ++j) { SomeAllocator alloc; for (int i = 0; i < PerAlloc; ++i) { Use alloc to allocate an int object; } Delete all int objects allocated by alloc; }
Here, PerAlloc means the number of integer objects allocated by ONE allocator. NAlloc means the number of allocator instances we need. And PerAlloc * NAlloc will be 1000,000.
Here is the source code for our test.
NOTE: In these tests we DISABLED APR Pools' multithread locks. If we enable it, APR Pools will be much slower.
Test Result on Linux
Environment:
- CPU: Intel(R) Pentium(R) D CPU 3.40GHz (2 CPUs)
- Memory: 2G
- OS: Ubuntu 4.1.2-0ubuntu4, Linux version 2.6.20-15-generic
- Compiler: g++ (GCC) 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)
One of our test results (in milliseconds):
PerAlloc | ScopeAlloc | AutoFreeAlloc | AprPools | MtAllocator | BoostPool | BoostObjectPool | NewDelete |
1 | 3.93 ms | 59.26 ms | 68.58 ms | 56.48 ms | 227.61 ms | 347.08 ms | 50.66 ms |
1000 | 0.90 ms | 0.95 ms | 7.12 ms | 61.58 ms | 6.02 ms | 9.18 ms | 50.75 ms |
1000000 | 1.36 ms | 2.01 ms | 7.28 ms | 73.66 ms | 6.54 ms | 9.42 ms | 106.72 ms |
Condition 1: Each allocator allocates one integer object
PerAlloc | ScopeAlloc | AutoFreeAlloc | AprPools | MtAllocator | BoostPool | BoostObjectPool | NewDelete |
1 | 3.93 ms | 59.26 ms | 68.58 ms | 56.48 ms | 227.61 ms | 347.08 ms | 50.66 ms |
===== AutoFreeAlloc(1) ===== ---> Elapse 60277000 ticks (60.28 ms) (0.00 min) ... ---> Elapse 59416000 ticks (59.42 ms) (0.00 min) ... ---> Elapse 58765000 ticks (58.77 ms) (0.00 min) ... ---> Elapse 58885000 ticks (58.88 ms) (0.00 min) ... ---> Elapse 59536000 ticks (59.54 ms) (0.00 min) ... ---> Elapse 59236000 ticks (59.24 ms) (0.00 min) ... ---> Elapse 58973000 ticks (58.97 ms) (0.00 min) ... ---> Elapse 58862000 ticks (58.86 ms) (0.00 min) ... ---> Elapse 59597000 ticks (59.60 ms) (0.00 min) ... ---> Elapse 59218000 ticks (59.22 ms) (0.00 min) ... ---> Elapse 59220000 ticks (59.22 ms) (0.00 min) ... ---> Elapse 59235000 ticks (59.23 ms) (0.00 min) ... ---> Elapse 59236000 ticks (59.24 ms) (0.00 min) ... ---> Elapse 59200000 ticks (59.20 ms) (0.00 min) ... ---> Elapse 59206000 ticks (59.21 ms) (0.00 min) ... ---> Elapse 59222000 ticks (59.22 ms) (0.00 min) ... Average: ---> Elapse 59255250 ticks (59.26 ms) (0.00 min) ... ===== APR Pools(1) ===== ---> Elapse 90855000 ticks (90.86 ms) (0.00 min) ... ---> Elapse 78417000 ticks (78.42 ms) (0.00 min) ... ---> Elapse 66304000 ticks (66.30 ms) (0.00 min) ... ---> Elapse 67284000 ticks (67.28 ms) (0.00 min) ... ---> Elapse 66928000 ticks (66.93 ms) (0.00 min) ... ---> Elapse 66778000 ticks (66.78 ms) (0.00 min) ... ---> Elapse 66076000 ticks (66.08 ms) (0.00 min) ... ---> Elapse 66081000 ticks (66.08 ms) (0.00 min) ... ---> Elapse 66075000 ticks (66.08 ms) (0.00 min) ... ---> Elapse 66075000 ticks (66.08 ms) (0.00 min) ... ---> Elapse 66076000 ticks (66.08 ms) (0.00 min) ... ---> Elapse 66076000 ticks (66.08 ms) (0.00 min) ... ---> Elapse 66075000 ticks (66.08 ms) (0.00 min) ... ---> Elapse 66075000 ticks (66.08 ms) (0.00 min) ... ---> Elapse 66077000 ticks (66.08 ms) (0.00 min) ... ---> Elapse 66074000 ticks (66.07 ms) (0.00 min) ... Average: ---> Elapse 68582875 ticks (68.58 ms) (0.00 min) ... ===== ScopeAlloc(1) ===== ---> Elapse 3999000 ticks (4.00 ms) (0.00 min) ... ---> Elapse 3945000 ticks (3.94 ms) (0.00 min) ... ---> Elapse 3937000 ticks (3.94 ms) (0.00 min) ... ---> Elapse 3928000 ticks (3.93 ms) (0.00 min) ... ---> Elapse 3920000 ticks (3.92 ms) (0.00 min) ... ---> Elapse 3903000 ticks (3.90 ms) (0.00 min) ... ---> Elapse 3897000 ticks (3.90 ms) (0.00 min) ... ---> Elapse 3950000 ticks (3.95 ms) (0.00 min) ... ---> Elapse 4117000 ticks (4.12 ms) (0.00 min) ... ---> Elapse 4011000 ticks (4.01 ms) (0.00 min) ... ---> Elapse 3889000 ticks (3.89 ms) (0.00 min) ... ---> Elapse 3950000 ticks (3.95 ms) (0.00 min) ... ---> Elapse 3951000 ticks (3.95 ms) (0.00 min) ... ---> Elapse 3835000 ticks (3.83 ms) (0.00 min) ... ---> Elapse 3835000 ticks (3.83 ms) (0.00 min) ... ---> Elapse 3835000 ticks (3.83 ms) (0.00 min) ... Average: ---> Elapse 3931375 ticks (3.93 ms) (0.00 min) ... ===== MtAllocator(1) ===== ---> Elapse 62577000 ticks (62.58 ms) (0.00 min) ... ---> Elapse 55457000 ticks (55.46 ms) (0.00 min) ... ---> Elapse 56042000 ticks (56.04 ms) (0.00 min) ... ---> Elapse 66440000 ticks (66.44 ms) (0.00 min) ... ---> Elapse 56342000 ticks (56.34 ms) (0.00 min) ... ---> Elapse 55163000 ticks (55.16 ms) (0.00 min) ... ---> Elapse 55176000 ticks (55.18 ms) (0.00 min) ... ---> Elapse 55162000 ticks (55.16 ms) (0.00 min) ... ---> Elapse 55163000 ticks (55.16 ms) (0.00 min) ... ---> Elapse 55162000 ticks (55.16 ms) (0.00 min) ... ---> Elapse 55162000 ticks (55.16 ms) (0.00 min) ... ---> Elapse 55180000 ticks (55.18 ms) (0.00 min) ... ---> Elapse 55162000 ticks (55.16 ms) (0.00 min) ... ---> Elapse 55162000 ticks (55.16 ms) (0.00 min) ... ---> Elapse 55163000 ticks (55.16 ms) (0.00 min) ... ---> Elapse 55162000 ticks (55.16 ms) (0.00 min) ... Average: ---> Elapse 56479687 ticks (56.48 ms) (0.00 min) ... ===== BoostPool(1) ===== ---> Elapse 240500000 ticks (240.50 ms) (0.00 min) ... ---> Elapse 224645000 ticks (224.65 ms) (0.00 min) ... ---> Elapse 227478000 ticks (227.48 ms) (0.00 min) ... ---> Elapse 227170000 ticks (227.17 ms) (0.00 min) ... ---> Elapse 224375000 ticks (224.38 ms) (0.00 min) ... ---> Elapse 224640000 ticks (224.64 ms) (0.00 min) ... ---> Elapse 224546000 ticks (224.55 ms) (0.00 min) ... ---> Elapse 229077000 ticks (229.08 ms) (0.00 min) ... ---> Elapse 228253000 ticks (228.25 ms) (0.00 min) ... ---> Elapse 226652000 ticks (226.65 ms) (0.00 min) ... ---> Elapse 224618000 ticks (224.62 ms) (0.00 min) ... ---> Elapse 229329000 ticks (229.33 ms) (0.00 min) ... ---> Elapse 229760000 ticks (229.76 ms) (0.00 min) ... ---> Elapse 231387000 ticks (231.39 ms) (0.00 min) ... ---> Elapse 224713000 ticks (224.71 ms) (0.00 min) ... ---> Elapse 224604000 ticks (224.60 ms) (0.00 min) ... Average: ---> Elapse 227609187 ticks (227.61 ms) (0.00 min) ... ===== BoostObjectPool(1) ===== ---> Elapse 342324000 ticks (342.32 ms) (0.01 min) ... ---> Elapse 347072000 ticks (347.07 ms) (0.01 min) ... ---> Elapse 344965000 ticks (344.96 ms) (0.01 min) ... ---> Elapse 345094000 ticks (345.09 ms) (0.01 min) ... ---> Elapse 343402000 ticks (343.40 ms) (0.01 min) ... ---> Elapse 346241000 ticks (346.24 ms) (0.01 min) ... ---> Elapse 363530000 ticks (363.53 ms) (0.01 min) ... ---> Elapse 348810000 ticks (348.81 ms) (0.01 min) ... ---> Elapse 344225000 ticks (344.23 ms) (0.01 min) ... ---> Elapse 344891000 ticks (344.89 ms) (0.01 min) ... ---> Elapse 346002000 ticks (346.00 ms) (0.01 min) ... ---> Elapse 344605000 ticks (344.61 ms) (0.01 min) ... ---> Elapse 345296000 ticks (345.30 ms) (0.01 min) ... ---> Elapse 356927000 ticks (356.93 ms) (0.01 min) ... ---> Elapse 345515000 ticks (345.51 ms) (0.01 min) ... ---> Elapse 344360000 ticks (344.36 ms) (0.01 min) ... Average: ---> Elapse 347078687 ticks (347.08 ms) (0.01 min) ... ===== NewDelete(1) ===== ---> Elapse 51334000 ticks (51.33 ms) (0.00 min) ... ---> Elapse 50972000 ticks (50.97 ms) (0.00 min) ... ---> Elapse 52545000 ticks (52.55 ms) (0.00 min) ... ---> Elapse 50441000 ticks (50.44 ms) (0.00 min) ... ---> Elapse 50442000 ticks (50.44 ms) (0.00 min) ... ---> Elapse 50446000 ticks (50.45 ms) (0.00 min) ... ---> Elapse 50442000 ticks (50.44 ms) (0.00 min) ... ---> Elapse 50443000 ticks (50.44 ms) (0.00 min) ... ---> Elapse 50441000 ticks (50.44 ms) (0.00 min) ... ---> Elapse 50442000 ticks (50.44 ms) (0.00 min) ... ---> Elapse 50449000 ticks (50.45 ms) (0.00 min) ... ---> Elapse 50443000 ticks (50.44 ms) (0.00 min) ... ---> Elapse 50441000 ticks (50.44 ms) (0.00 min) ... ---> Elapse 50441000 ticks (50.44 ms) (0.00 min) ... ---> Elapse 50442000 ticks (50.44 ms) (0.00 min) ... ---> Elapse 50442000 ticks (50.44 ms) (0.00 min) ... Average: ---> Elapse 50662875 ticks (50.66 ms) (0.00 min) ...
Condition 2: Each allocator allocates 1000 integer objects
PerAlloc | ScopeAlloc | AutoFreeAlloc | AprPools | MtAllocator | BoostPool | BoostObjectPool | NewDelete |
1000 | 0.90 ms | 0.95 ms | 7.12 ms | 61.58 ms | 6.02 ms | 9.18 ms | 50.75 ms |
===== AutoFreeAlloc(1000) ===== ---> Elapse 961000 ticks (0.96 ms) (0.00 min) ... ---> Elapse 955000 ticks (0.95 ms) (0.00 min) ... ---> Elapse 953000 ticks (0.95 ms) (0.00 min) ... ---> Elapse 953000 ticks (0.95 ms) (0.00 min) ... ---> Elapse 955000 ticks (0.95 ms) (0.00 min) ... ---> Elapse 954000 ticks (0.95 ms) (0.00 min) ... ---> Elapse 953000 ticks (0.95 ms) (0.00 min) ... ---> Elapse 954000 ticks (0.95 ms) (0.00 min) ... ---> Elapse 955000 ticks (0.95 ms) (0.00 min) ... ---> Elapse 953000 ticks (0.95 ms) (0.00 min) ... ---> Elapse 953000 ticks (0.95 ms) (0.00 min) ... ---> Elapse 953000 ticks (0.95 ms) (0.00 min) ... ---> Elapse 955000 ticks (0.95 ms) (0.00 min) ... ---> Elapse 953000 ticks (0.95 ms) (0.00 min) ... ---> Elapse 953000 ticks (0.95 ms) (0.00 min) ... ---> Elapse 953000 ticks (0.95 ms) (0.00 min) ... Average: ---> Elapse 954125 ticks (0.95 ms) (0.00 min) ... ===== APR Pools(1000) ===== ---> Elapse 6576000 ticks (6.58 ms) (0.00 min) ... ---> Elapse 7154000 ticks (7.15 ms) (0.00 min) ... ---> Elapse 7153000 ticks (7.15 ms) (0.00 min) ... ---> Elapse 7153000 ticks (7.15 ms) (0.00 min) ... ---> Elapse 7153000 ticks (7.15 ms) (0.00 min) ... ---> Elapse 7153000 ticks (7.15 ms) (0.00 min) ... ---> Elapse 7154000 ticks (7.15 ms) (0.00 min) ... ---> Elapse 7151000 ticks (7.15 ms) (0.00 min) ... ---> Elapse 7153000 ticks (7.15 ms) (0.00 min) ... ---> Elapse 7154000 ticks (7.15 ms) (0.00 min) ... ---> Elapse 7153000 ticks (7.15 ms) (0.00 min) ... ---> Elapse 7153000 ticks (7.15 ms) (0.00 min) ... ---> Elapse 7153000 ticks (7.15 ms) (0.00 min) ... ---> Elapse 7154000 ticks (7.15 ms) (0.00 min) ... ---> Elapse 7150000 ticks (7.15 ms) (0.00 min) ... ---> Elapse 7150000 ticks (7.15 ms) (0.00 min) ... Average: ---> Elapse 7116687 ticks (7.12 ms) (0.00 min) ... ===== ScopeAlloc(1000) ===== ---> Elapse 899000 ticks (0.90 ms) (0.00 min) ... ---> Elapse 898000 ticks (0.90 ms) (0.00 min) ... ---> Elapse 899000 ticks (0.90 ms) (0.00 min) ... ---> Elapse 900000 ticks (0.90 ms) (0.00 min) ... ---> Elapse 899000 ticks (0.90 ms) (0.00 min) ... ---> Elapse 898000 ticks (0.90 ms) (0.00 min) ... ---> Elapse 898000 ticks (0.90 ms) (0.00 min) ... ---> Elapse 900000 ticks (0.90 ms) (0.00 min) ... ---> Elapse 898000 ticks (0.90 ms) (0.00 min) ... ---> Elapse 898000 ticks (0.90 ms) (0.00 min) ... ---> Elapse 898000 ticks (0.90 ms) (0.00 min) ... ---> Elapse 900000 ticks (0.90 ms) (0.00 min) ... ---> Elapse 899000 ticks (0.90 ms) (0.00 min) ... ---> Elapse 898000 ticks (0.90 ms) (0.00 min) ... ---> Elapse 898000 ticks (0.90 ms) (0.00 min) ... ---> Elapse 898000 ticks (0.90 ms) (0.00 min) ... Average: ---> Elapse 898625 ticks (0.90 ms) (0.00 min) ... ===== MtAllocator(1000) ===== ---> Elapse 60444000 ticks (60.44 ms) (0.00 min) ... ---> Elapse 59960000 ticks (59.96 ms) (0.00 min) ... ---> Elapse 59544000 ticks (59.54 ms) (0.00 min) ... ---> Elapse 74629000 ticks (74.63 ms) (0.00 min) ... ---> Elapse 59389000 ticks (59.39 ms) (0.00 min) ... ---> Elapse 61638000 ticks (61.64 ms) (0.00 min) ... ---> Elapse 61749000 ticks (61.75 ms) (0.00 min) ... ---> Elapse 62300000 ticks (62.30 ms) (0.00 min) ... ---> Elapse 62222000 ticks (62.22 ms) (0.00 min) ... ---> Elapse 62088000 ticks (62.09 ms) (0.00 min) ... ---> Elapse 60431000 ticks (60.43 ms) (0.00 min) ... ---> Elapse 59998000 ticks (60.00 ms) (0.00 min) ... ---> Elapse 60026000 ticks (60.03 ms) (0.00 min) ... ---> Elapse 60467000 ticks (60.47 ms) (0.00 min) ... ---> Elapse 60357000 ticks (60.36 ms) (0.00 min) ... ---> Elapse 60115000 ticks (60.12 ms) (0.00 min) ... Average: ---> Elapse 61584812 ticks (61.58 ms) (0.00 min) ... ===== BoostPool(1000) ===== ---> Elapse 6117000 ticks (6.12 ms) (0.00 min) ... ---> Elapse 6028000 ticks (6.03 ms) (0.00 min) ... ---> Elapse 6009000 ticks (6.01 ms) (0.00 min) ... ---> Elapse 5973000 ticks (5.97 ms) (0.00 min) ... ---> Elapse 5965000 ticks (5.96 ms) (0.00 min) ... ---> Elapse 5977000 ticks (5.98 ms) (0.00 min) ... ---> Elapse 5972000 ticks (5.97 ms) (0.00 min) ... ---> Elapse 5980000 ticks (5.98 ms) (0.00 min) ... ---> Elapse 5996000 ticks (6.00 ms) (0.00 min) ... ---> Elapse 6104000 ticks (6.10 ms) (0.00 min) ... ---> Elapse 6067000 ticks (6.07 ms) (0.00 min) ... ---> Elapse 5996000 ticks (6.00 ms) (0.00 min) ... ---> Elapse 5999000 ticks (6.00 ms) (0.00 min) ... ---> Elapse 6005000 ticks (6.00 ms) (0.00 min) ... ---> Elapse 6008000 ticks (6.01 ms) (0.00 min) ... ---> Elapse 6054000 ticks (6.05 ms) (0.00 min) ... Average: ---> Elapse 6015625 ticks (6.02 ms) (0.00 min) ... ===== BoostObjectPool(1000) ===== ---> Elapse 9124000 ticks (9.12 ms) (0.00 min) ... ---> Elapse 9104000 ticks (9.10 ms) (0.00 min) ... ---> Elapse 9073000 ticks (9.07 ms) (0.00 min) ... ---> Elapse 9072000 ticks (9.07 ms) (0.00 min) ... ---> Elapse 9033000 ticks (9.03 ms) (0.00 min) ... ---> Elapse 9126000 ticks (9.13 ms) (0.00 min) ... ---> Elapse 9025000 ticks (9.03 ms) (0.00 min) ... ---> Elapse 9054000 ticks (9.05 ms) (0.00 min) ... ---> Elapse 9095000 ticks (9.10 ms) (0.00 min) ... ---> Elapse 9076000 ticks (9.08 ms) (0.00 min) ... ---> Elapse 9022000 ticks (9.02 ms) (0.00 min) ... ---> Elapse 9071000 ticks (9.07 ms) (0.00 min) ... ---> Elapse 9103000 ticks (9.10 ms) (0.00 min) ... ---> Elapse 9122000 ticks (9.12 ms) (0.00 min) ... ---> Elapse 10740000 ticks (10.74 ms) (0.00 min) ... ---> Elapse 9007000 ticks (9.01 ms) (0.00 min) ... Average: ---> Elapse 9177937 ticks (9.18 ms) (0.00 min) ... ===== NewDelete(1000) ===== ---> Elapse 52086000 ticks (52.09 ms) (0.00 min) ... ---> Elapse 51286000 ticks (51.29 ms) (0.00 min) ... ---> Elapse 51260000 ticks (51.26 ms) (0.00 min) ... ---> Elapse 50410000 ticks (50.41 ms) (0.00 min) ... ---> Elapse 50700000 ticks (50.70 ms) (0.00 min) ... ---> Elapse 50273000 ticks (50.27 ms) (0.00 min) ... ---> Elapse 50252000 ticks (50.25 ms) (0.00 min) ... ---> Elapse 50244000 ticks (50.24 ms) (0.00 min) ... ---> Elapse 50672000 ticks (50.67 ms) (0.00 min) ... ---> Elapse 50683000 ticks (50.68 ms) (0.00 min) ... ---> Elapse 50700000 ticks (50.70 ms) (0.00 min) ... ---> Elapse 50699000 ticks (50.70 ms) (0.00 min) ... ---> Elapse 51126000 ticks (51.13 ms) (0.00 min) ... ---> Elapse 51105000 ticks (51.10 ms) (0.00 min) ... ---> Elapse 50253000 ticks (50.25 ms) (0.00 min) ... ---> Elapse 50262000 ticks (50.26 ms) (0.00 min) ... Average: ---> Elapse 50750687 ticks (50.75 ms) (0.00 min) ...
Condition 3: Each allocator allocates 1000,000 integer objects
PerAlloc | ScopeAlloc | AutoFreeAlloc | AprPools | MtAllocator | BoostPool | BoostObjectPool | NewDelete |
1000000 | 1.36 ms | 2.01 ms | 7.28 ms | 73.66 ms | 6.54 ms | 9.42 ms | 106.72 ms |
===== AutoFreeAlloc(1000000) ===== ---> Elapse 2143000 ticks (2.14 ms) (0.00 min) ... ---> Elapse 2010000 ticks (2.01 ms) (0.00 min) ... ---> Elapse 1999000 ticks (2.00 ms) (0.00 min) ... ---> Elapse 2005000 ticks (2.00 ms) (0.00 min) ... ---> Elapse 2003000 ticks (2.00 ms) (0.00 min) ... ---> Elapse 2017000 ticks (2.02 ms) (0.00 min) ... ---> Elapse 2001000 ticks (2.00 ms) (0.00 min) ... ---> Elapse 2003000 ticks (2.00 ms) (0.00 min) ... ---> Elapse 2007000 ticks (2.01 ms) (0.00 min) ... ---> Elapse 2008000 ticks (2.01 ms) (0.00 min) ... ---> Elapse 2004000 ticks (2.00 ms) (0.00 min) ... ---> Elapse 2005000 ticks (2.00 ms) (0.00 min) ... ---> Elapse 1999000 ticks (2.00 ms) (0.00 min) ... ---> Elapse 2004000 ticks (2.00 ms) (0.00 min) ... ---> Elapse 2002000 ticks (2.00 ms) (0.00 min) ... ---> Elapse 2002000 ticks (2.00 ms) (0.00 min) ... Average: ---> Elapse 2013250 ticks (2.01 ms) (0.00 min) ... ===== APR Pools(1000000) ===== ---> Elapse 9374000 ticks (9.37 ms) (0.00 min) ... ---> Elapse 7150000 ticks (7.15 ms) (0.00 min) ... ---> Elapse 7140000 ticks (7.14 ms) (0.00 min) ... ---> Elapse 7139000 ticks (7.14 ms) (0.00 min) ... ---> Elapse 7140000 ticks (7.14 ms) (0.00 min) ... ---> Elapse 7141000 ticks (7.14 ms) (0.00 min) ... ---> Elapse 7142000 ticks (7.14 ms) (0.00 min) ... ---> Elapse 7140000 ticks (7.14 ms) (0.00 min) ... ---> Elapse 7138000 ticks (7.14 ms) (0.00 min) ... ---> Elapse 7139000 ticks (7.14 ms) (0.00 min) ... ---> Elapse 7138000 ticks (7.14 ms) (0.00 min) ... ---> Elapse 7139000 ticks (7.14 ms) (0.00 min) ... ---> Elapse 7140000 ticks (7.14 ms) (0.00 min) ... ---> Elapse 7137000 ticks (7.14 ms) (0.00 min) ... ---> Elapse 7141000 ticks (7.14 ms) (0.00 min) ... ---> Elapse 7139000 ticks (7.14 ms) (0.00 min) ... Average: ---> Elapse 7279812 ticks (7.28 ms) (0.00 min) ... ===== ScopeAlloc(1000000) ===== ---> Elapse 1742000 ticks (1.74 ms) (0.00 min) ... ---> Elapse 1343000 ticks (1.34 ms) (0.00 min) ... ---> Elapse 1339000 ticks (1.34 ms) (0.00 min) ... ---> Elapse 1342000 ticks (1.34 ms) (0.00 min) ... ---> Elapse 1338000 ticks (1.34 ms) (0.00 min) ... ---> Elapse 1338000 ticks (1.34 ms) (0.00 min) ... ---> Elapse 1339000 ticks (1.34 ms) (0.00 min) ... ---> Elapse 1340000 ticks (1.34 ms) (0.00 min) ... ---> Elapse 1339000 ticks (1.34 ms) (0.00 min) ... ---> Elapse 1338000 ticks (1.34 ms) (0.00 min) ... ---> Elapse 1338000 ticks (1.34 ms) (0.00 min) ... ---> Elapse 1338000 ticks (1.34 ms) (0.00 min) ... ---> Elapse 1342000 ticks (1.34 ms) (0.00 min) ... ---> Elapse 1337000 ticks (1.34 ms) (0.00 min) ... ---> Elapse 1341000 ticks (1.34 ms) (0.00 min) ... ---> Elapse 1339000 ticks (1.34 ms) (0.00 min) ... Average: ---> Elapse 1364562 ticks (1.36 ms) (0.00 min) ... ===== MtAllocator(1000000) ===== ---> Elapse 93161000 ticks (93.16 ms) (0.00 min) ... ---> Elapse 83611000 ticks (83.61 ms) (0.00 min) ... ---> Elapse 69034000 ticks (69.03 ms) (0.00 min) ... ---> Elapse 71789000 ticks (71.79 ms) (0.00 min) ... ---> Elapse 69362000 ticks (69.36 ms) (0.00 min) ... ---> Elapse 69481000 ticks (69.48 ms) (0.00 min) ... ---> Elapse 69762000 ticks (69.76 ms) (0.00 min) ... ---> Elapse 69708000 ticks (69.71 ms) (0.00 min) ... ---> Elapse 70739000 ticks (70.74 ms) (0.00 min) ... ---> Elapse 71070000 ticks (71.07 ms) (0.00 min) ... ---> Elapse 71050000 ticks (71.05 ms) (0.00 min) ... ---> Elapse 71672000 ticks (71.67 ms) (0.00 min) ... ---> Elapse 71821000 ticks (71.82 ms) (0.00 min) ... ---> Elapse 73522000 ticks (73.52 ms) (0.00 min) ... ---> Elapse 78314000 ticks (78.31 ms) (0.00 min) ... ---> Elapse 74533000 ticks (74.53 ms) (0.00 min) ... Average: ---> Elapse 73664312 ticks (73.66 ms) (0.00 min) ... ===== BoostPool(1000000) ===== ---> Elapse 6848000 ticks (6.85 ms) (0.00 min) ... ---> Elapse 6485000 ticks (6.49 ms) (0.00 min) ... ---> Elapse 6509000 ticks (6.51 ms) (0.00 min) ... ---> Elapse 6504000 ticks (6.50 ms) (0.00 min) ... ---> Elapse 6518000 ticks (6.52 ms) (0.00 min) ... ---> Elapse 6540000 ticks (6.54 ms) (0.00 min) ... ---> Elapse 6523000 ticks (6.52 ms) (0.00 min) ... ---> Elapse 6528000 ticks (6.53 ms) (0.00 min) ... ---> Elapse 6524000 ticks (6.52 ms) (0.00 min) ... ---> Elapse 6505000 ticks (6.50 ms) (0.00 min) ... ---> Elapse 6510000 ticks (6.51 ms) (0.00 min) ... ---> Elapse 6516000 ticks (6.52 ms) (0.00 min) ... ---> Elapse 6517000 ticks (6.52 ms) (0.00 min) ... ---> Elapse 6521000 ticks (6.52 ms) (0.00 min) ... ---> Elapse 6520000 ticks (6.52 ms) (0.00 min) ... ---> Elapse 6518000 ticks (6.52 ms) (0.00 min) ... Average: ---> Elapse 6536625 ticks (6.54 ms) (0.00 min) ... ===== BoostObjectPool(1000000) ===== ---> Elapse 9039000 ticks (9.04 ms) (0.00 min) ... ---> Elapse 9415000 ticks (9.41 ms) (0.00 min) ... ---> Elapse 9419000 ticks (9.42 ms) (0.00 min) ... ---> Elapse 9434000 ticks (9.43 ms) (0.00 min) ... ---> Elapse 9425000 ticks (9.43 ms) (0.00 min) ... ---> Elapse 9410000 ticks (9.41 ms) (0.00 min) ... ---> Elapse 9416000 ticks (9.42 ms) (0.00 min) ... ---> Elapse 9422000 ticks (9.42 ms) (0.00 min) ... ---> Elapse 9422000 ticks (9.42 ms) (0.00 min) ... ---> Elapse 9690000 ticks (9.69 ms) (0.00 min) ... ---> Elapse 9421000 ticks (9.42 ms) (0.00 min) ... ---> Elapse 9447000 ticks (9.45 ms) (0.00 min) ... ---> Elapse 9430000 ticks (9.43 ms) (0.00 min) ... ---> Elapse 9414000 ticks (9.41 ms) (0.00 min) ... ---> Elapse 9412000 ticks (9.41 ms) (0.00 min) ... ---> Elapse 9428000 ticks (9.43 ms) (0.00 min) ... Average: ---> Elapse 9415250 ticks (9.42 ms) (0.00 min) ... ===== NewDelete(1000000) ===== ---> Elapse 100711000 ticks (100.71 ms) (0.00 min) ... ---> Elapse 106234000 ticks (106.23 ms) (0.00 min) ... ---> Elapse 107726000 ticks (107.73 ms) (0.00 min) ... ---> Elapse 105012000 ticks (105.01 ms) (0.00 min) ... ---> Elapse 104404000 ticks (104.40 ms) (0.00 min) ... ---> Elapse 113810000 ticks (113.81 ms) (0.00 min) ... ---> Elapse 107270000 ticks (107.27 ms) (0.00 min) ... ---> Elapse 105132000 ticks (105.13 ms) (0.00 min) ... ---> Elapse 106814000 ticks (106.81 ms) (0.00 min) ... ---> Elapse 106899000 ticks (106.90 ms) (0.00 min) ... ---> Elapse 106289000 ticks (106.29 ms) (0.00 min) ... ---> Elapse 106437000 ticks (106.44 ms) (0.00 min) ... ---> Elapse 107213000 ticks (107.21 ms) (0.00 min) ... ---> Elapse 106646000 ticks (106.65 ms) (0.00 min) ... ---> Elapse 110064000 ticks (110.06 ms) (0.00 min) ... ---> Elapse 106929000 ticks (106.93 ms) (0.00 min) ... Average: ---> Elapse 106724375 ticks (106.72 ms) (0.00 min) ...
Test Result on Windows
Environment:
- CPU: Intel(R) Core(TM)2 CPU 1.66GHz (2 CPUs)
- Memory: 1G
- OS: Microsoft Windows XP Professional
- Compiler: Visual C++ 2005
- C Runtime: Multithreaded DLL
One of our test results (in milliseconds):
PerAlloc | ScopeAlloc | AutoFreeAlloc | AprPools | BoostPool | BoostObjectPool | NewDelete |
1 | 18.59 ms | 124.85 ms | 87.06 ms | 321.21 ms | 489.47 ms | 197.76 ms |
1000 | 1.26 ms | 1.33 ms | 10.55 ms | 6.62 ms | 17.42 ms | 358.72 ms |
1000000 | 1.24 ms | 1.30 ms | 11.37 ms | 7.23 ms | 12.71 ms | 504.43 ms |
Condition 1: Each allocator allocates one integer object
PerAlloc | ScopeAlloc | AutoFreeAlloc | AprPools | BoostPool | BoostObjectPool | NewDelete |
1 | 18.59 ms | 124.85 ms | 87.06 ms | 321.21 ms | 489.47 ms | 197.76 ms |
===== AutoFreeAlloc(1) ===== ---> Elapse 455410 ticks (127.23 ms) (0.00 min) ... ---> Elapse 448887 ticks (125.40 ms) (0.00 min) ... ---> Elapse 455112 ticks (127.14 ms) (0.00 min) ... ---> Elapse 444429 ticks (124.16 ms) (0.00 min) ... ---> Elapse 444437 ticks (124.16 ms) (0.00 min) ... ---> Elapse 444385 ticks (124.15 ms) (0.00 min) ... ---> Elapse 444174 ticks (124.09 ms) (0.00 min) ... ---> Elapse 444425 ticks (124.16 ms) (0.00 min) ... ---> Elapse 443950 ticks (124.02 ms) (0.00 min) ... ---> Elapse 445853 ticks (124.56 ms) (0.00 min) ... ---> Elapse 445022 ticks (124.32 ms) (0.00 min) ... ---> Elapse 451683 ticks (126.18 ms) (0.00 min) ... ---> Elapse 444521 ticks (124.18 ms) (0.00 min) ... ---> Elapse 445437 ticks (124.44 ms) (0.00 min) ... ---> Elapse 446075 ticks (124.62 ms) (0.00 min) ... ---> Elapse 446787 ticks (124.82 ms) (0.00 min) ... Average: ---> Elapse 446911 ticks (124.85 ms) (0.00 min) ... ===== APR Pools(1) ===== ---> Elapse 312086 ticks (87.19 ms) (0.00 min) ... ---> Elapse 311528 ticks (87.03 ms) (0.00 min) ... ---> Elapse 313387 ticks (87.55 ms) (0.00 min) ... ---> Elapse 310825 ticks (86.83 ms) (0.00 min) ... ---> Elapse 312367 ticks (87.26 ms) (0.00 min) ... ---> Elapse 312434 ticks (87.28 ms) (0.00 min) ... ---> Elapse 313069 ticks (87.46 ms) (0.00 min) ... ---> Elapse 311080 ticks (86.90 ms) (0.00 min) ... ---> Elapse 311187 ticks (86.93 ms) (0.00 min) ... ---> Elapse 309268 ticks (86.40 ms) (0.00 min) ... ---> Elapse 312653 ticks (87.34 ms) (0.00 min) ... ---> Elapse 313971 ticks (87.71 ms) (0.00 min) ... ---> Elapse 312093 ticks (87.19 ms) (0.00 min) ... ---> Elapse 309558 ticks (86.48 ms) (0.00 min) ... ---> Elapse 308761 ticks (86.26 ms) (0.00 min) ... ---> Elapse 311679 ticks (87.07 ms) (0.00 min) ... Average: ---> Elapse 311621 ticks (87.06 ms) (0.00 min) ... ===== ScopeAlloc(1) ===== ---> Elapse 66221 ticks (18.50 ms) (0.00 min) ... ---> Elapse 67731 ticks (18.92 ms) (0.00 min) ... ---> Elapse 68013 ticks (19.00 ms) (0.00 min) ... ---> Elapse 66195 ticks (18.49 ms) (0.00 min) ... ---> Elapse 66070 ticks (18.46 ms) (0.00 min) ... ---> Elapse 66101 ticks (18.47 ms) (0.00 min) ... ---> Elapse 66113 ticks (18.47 ms) (0.00 min) ... ---> Elapse 66006 ticks (18.44 ms) (0.00 min) ... ---> Elapse 68940 ticks (19.26 ms) (0.00 min) ... ---> Elapse 66197 ticks (18.49 ms) (0.00 min) ... ---> Elapse 66074 ticks (18.46 ms) (0.00 min) ... ---> Elapse 66144 ticks (18.48 ms) (0.00 min) ... ---> Elapse 66287 ticks (18.52 ms) (0.00 min) ... ---> Elapse 66604 ticks (18.61 ms) (0.00 min) ... ---> Elapse 66672 ticks (18.63 ms) (0.00 min) ... ---> Elapse 65544 ticks (18.31 ms) (0.00 min) ... Average: ---> Elapse 66557 ticks (18.59 ms) (0.00 min) ... ===== BoostPool(1) ===== ---> Elapse 1148488 ticks (320.85 ms) (0.01 min) ... ---> Elapse 1149156 ticks (321.03 ms) (0.01 min) ... ---> Elapse 1145412 ticks (319.99 ms) (0.01 min) ... ---> Elapse 1210146 ticks (338.07 ms) (0.01 min) ... ---> Elapse 1145029 ticks (319.88 ms) (0.01 min) ... ---> Elapse 1136874 ticks (317.60 ms) (0.01 min) ... ---> Elapse 1147610 ticks (320.60 ms) (0.01 min) ... ---> Elapse 1148825 ticks (320.94 ms) (0.01 min) ... ---> Elapse 1147979 ticks (320.71 ms) (0.01 min) ... ---> Elapse 1145527 ticks (320.02 ms) (0.01 min) ... ---> Elapse 1143509 ticks (319.46 ms) (0.01 min) ... ---> Elapse 1146767 ticks (320.37 ms) (0.01 min) ... ---> Elapse 1141825 ticks (318.99 ms) (0.01 min) ... ---> Elapse 1140260 ticks (318.55 ms) (0.01 min) ... ---> Elapse 1149622 ticks (321.16 ms) (0.01 min) ... ---> Elapse 1149693 ticks (321.18 ms) (0.01 min) ... Average: ---> Elapse 1149795 ticks (321.21 ms) (0.01 min) ... ===== BoostObjectPool(1) ===== ---> Elapse 1744505 ticks (487.35 ms) (0.01 min) ... ---> Elapse 1754014 ticks (490.01 ms) (0.01 min) ... ---> Elapse 1761612 ticks (492.13 ms) (0.01 min) ... ---> Elapse 1757751 ticks (491.05 ms) (0.01 min) ... ---> Elapse 1756652 ticks (490.75 ms) (0.01 min) ... ---> Elapse 1738182 ticks (485.59 ms) (0.01 min) ... ---> Elapse 1742820 ticks (486.88 ms) (0.01 min) ... ---> Elapse 1745795 ticks (487.71 ms) (0.01 min) ... ---> Elapse 1739646 ticks (486.00 ms) (0.01 min) ... ---> Elapse 1764164 ticks (492.85 ms) (0.01 min) ... ---> Elapse 1758830 ticks (491.36 ms) (0.01 min) ... ---> Elapse 1764290 ticks (492.88 ms) (0.01 min) ... ---> Elapse 1763460 ticks (492.65 ms) (0.01 min) ... ---> Elapse 1754850 ticks (490.24 ms) (0.01 min) ... ---> Elapse 1744990 ticks (487.49 ms) (0.01 min) ... ---> Elapse 1741639 ticks (486.55 ms) (0.01 min) ... Average: ---> Elapse 1752075 ticks (489.47 ms) (0.01 min) ... ===== NewDelete(1) ===== ---> Elapse 706576 ticks (197.39 ms) (0.00 min) ... ---> Elapse 705898 ticks (197.20 ms) (0.00 min) ... ---> Elapse 705662 ticks (197.14 ms) (0.00 min) ... ---> Elapse 706997 ticks (197.51 ms) (0.00 min) ... ---> Elapse 706105 ticks (197.26 ms) (0.00 min) ... ---> Elapse 720836 ticks (201.38 ms) (0.00 min) ... ---> Elapse 707336 ticks (197.61 ms) (0.00 min) ... ---> Elapse 707335 ticks (197.60 ms) (0.00 min) ... ---> Elapse 709110 ticks (198.10 ms) (0.00 min) ... ---> Elapse 707873 ticks (197.76 ms) (0.00 min) ... ---> Elapse 707794 ticks (197.73 ms) (0.00 min) ... ---> Elapse 709377 ticks (198.18 ms) (0.00 min) ... ---> Elapse 707892 ticks (197.76 ms) (0.00 min) ... ---> Elapse 706092 ticks (197.26 ms) (0.00 min) ... ---> Elapse 705457 ticks (197.08 ms) (0.00 min) ... ---> Elapse 705855 ticks (197.19 ms) (0.00 min) ... Average: ---> Elapse 707887 ticks (197.76 ms) (0.00 min) ...
Condition 2: Each allocator allocates 1000 integer objects
PerAlloc | ScopeAlloc | AutoFreeAlloc | AprPools | BoostPool | BoostObjectPool | NewDelete |
1000 | 1.26 ms | 1.33 ms | 10.55 ms | 6.62 ms | 17.42 ms | 358.72 ms |
===== AutoFreeAlloc(1000) ===== ---> Elapse 4782 ticks (1.34 ms) (0.00 min) ... ---> Elapse 4770 ticks (1.33 ms) (0.00 min) ... ---> Elapse 4771 ticks (1.33 ms) (0.00 min) ... ---> Elapse 4770 ticks (1.33 ms) (0.00 min) ... ---> Elapse 4774 ticks (1.33 ms) (0.00 min) ... ---> Elapse 4770 ticks (1.33 ms) (0.00 min) ... ---> Elapse 4770 ticks (1.33 ms) (0.00 min) ... ---> Elapse 4770 ticks (1.33 ms) (0.00 min) ... ---> Elapse 4770 ticks (1.33 ms) (0.00 min) ... ---> Elapse 4807 ticks (1.34 ms) (0.00 min) ... ---> Elapse 4773 ticks (1.33 ms) (0.00 min) ... ---> Elapse 4773 ticks (1.33 ms) (0.00 min) ... ---> Elapse 4772 ticks (1.33 ms) (0.00 min) ... ---> Elapse 4772 ticks (1.33 ms) (0.00 min) ... ---> Elapse 4773 ticks (1.33 ms) (0.00 min) ... ---> Elapse 4773 ticks (1.33 ms) (0.00 min) ... Average: ---> Elapse 4774 ticks (1.33 ms) (0.00 min) ... ===== APR Pools(1000) ===== ---> Elapse 38491 ticks (10.75 ms) (0.00 min) ... ---> Elapse 39683 ticks (11.09 ms) (0.00 min) ... ---> Elapse 37656 ticks (10.52 ms) (0.00 min) ... ---> Elapse 37070 ticks (10.36 ms) (0.00 min) ... ---> Elapse 36932 ticks (10.32 ms) (0.00 min) ... ---> Elapse 37060 ticks (10.35 ms) (0.00 min) ... ---> Elapse 37087 ticks (10.36 ms) (0.00 min) ... ---> Elapse 37293 ticks (10.42 ms) (0.00 min) ... ---> Elapse 39025 ticks (10.90 ms) (0.00 min) ... ---> Elapse 39841 ticks (11.13 ms) (0.00 min) ... ---> Elapse 38886 ticks (10.86 ms) (0.00 min) ... ---> Elapse 37055 ticks (10.35 ms) (0.00 min) ... ---> Elapse 36960 ticks (10.33 ms) (0.00 min) ... ---> Elapse 36963 ticks (10.33 ms) (0.00 min) ... ---> Elapse 37339 ticks (10.43 ms) (0.00 min) ... ---> Elapse 36960 ticks (10.33 ms) (0.00 min) ... Average: ---> Elapse 37768 ticks (10.55 ms) (0.00 min) ... ===== ScopeAlloc(1000) ===== ---> Elapse 4481 ticks (1.25 ms) (0.00 min) ... ---> Elapse 4478 ticks (1.25 ms) (0.00 min) ... ---> Elapse 4483 ticks (1.25 ms) (0.00 min) ... ---> Elapse 4757 ticks (1.33 ms) (0.00 min) ... ---> Elapse 4479 ticks (1.25 ms) (0.00 min) ... ---> Elapse 4479 ticks (1.25 ms) (0.00 min) ... ---> Elapse 4479 ticks (1.25 ms) (0.00 min) ... ---> Elapse 4479 ticks (1.25 ms) (0.00 min) ... ---> Elapse 4479 ticks (1.25 ms) (0.00 min) ... ---> Elapse 4489 ticks (1.25 ms) (0.00 min) ... ---> Elapse 4479 ticks (1.25 ms) (0.00 min) ... ---> Elapse 4479 ticks (1.25 ms) (0.00 min) ... ---> Elapse 4478 ticks (1.25 ms) (0.00 min) ... ---> Elapse 4482 ticks (1.25 ms) (0.00 min) ... ---> Elapse 4482 ticks (1.25 ms) (0.00 min) ... ---> Elapse 4479 ticks (1.25 ms) (0.00 min) ... Average: ---> Elapse 4497 ticks (1.26 ms) (0.00 min) ... ===== BoostPool(1000) ===== ---> Elapse 23697 ticks (6.62 ms) (0.00 min) ... ---> Elapse 23636 ticks (6.60 ms) (0.00 min) ... ---> Elapse 23723 ticks (6.63 ms) (0.00 min) ... ---> Elapse 23771 ticks (6.64 ms) (0.00 min) ... ---> Elapse 23787 ticks (6.65 ms) (0.00 min) ... ---> Elapse 23717 ticks (6.63 ms) (0.00 min) ... ---> Elapse 23662 ticks (6.61 ms) (0.00 min) ... ---> Elapse 23759 ticks (6.64 ms) (0.00 min) ... ---> Elapse 23675 ticks (6.61 ms) (0.00 min) ... ---> Elapse 23638 ticks (6.60 ms) (0.00 min) ... ---> Elapse 23610 ticks (6.60 ms) (0.00 min) ... ---> Elapse 23644 ticks (6.61 ms) (0.00 min) ... ---> Elapse 23695 ticks (6.62 ms) (0.00 min) ... ---> Elapse 23659 ticks (6.61 ms) (0.00 min) ... ---> Elapse 23694 ticks (6.62 ms) (0.00 min) ... ---> Elapse 23742 ticks (6.63 ms) (0.00 min) ... Average: ---> Elapse 23694 ticks (6.62 ms) (0.00 min) ... ===== BoostObjectPool(1000) ===== ---> Elapse 62177 ticks (17.37 ms) (0.00 min) ... ---> Elapse 62067 ticks (17.34 ms) (0.00 min) ... ---> Elapse 62406 ticks (17.43 ms) (0.00 min) ... ---> Elapse 62773 ticks (17.54 ms) (0.00 min) ... ---> Elapse 62416 ticks (17.44 ms) (0.00 min) ... ---> Elapse 61914 ticks (17.30 ms) (0.00 min) ... ---> Elapse 62260 ticks (17.39 ms) (0.00 min) ... ---> Elapse 62976 ticks (17.59 ms) (0.00 min) ... ---> Elapse 62315 ticks (17.41 ms) (0.00 min) ... ---> Elapse 62661 ticks (17.51 ms) (0.00 min) ... ---> Elapse 62388 ticks (17.43 ms) (0.00 min) ... ---> Elapse 62342 ticks (17.42 ms) (0.00 min) ... ---> Elapse 62251 ticks (17.39 ms) (0.00 min) ... ---> Elapse 62267 ticks (17.40 ms) (0.00 min) ... ---> Elapse 61929 ticks (17.30 ms) (0.00 min) ... ---> Elapse 62666 ticks (17.51 ms) (0.00 min) ... Average: ---> Elapse 62363 ticks (17.42 ms) (0.00 min) ... ===== NewDelete(1000) ===== ---> Elapse 1283233 ticks (358.49 ms) (0.01 min) ... ---> Elapse 1282120 ticks (358.18 ms) (0.01 min) ... ---> Elapse 1280018 ticks (357.59 ms) (0.01 min) ... ---> Elapse 1285092 ticks (359.01 ms) (0.01 min) ... ---> Elapse 1281632 ticks (358.04 ms) (0.01 min) ... ---> Elapse 1284337 ticks (358.80 ms) (0.01 min) ... ---> Elapse 1294028 ticks (361.51 ms) (0.01 min) ... ---> Elapse 1282479 ticks (358.28 ms) (0.01 min) ... ---> Elapse 1282658 ticks (358.33 ms) (0.01 min) ... ---> Elapse 1280433 ticks (357.71 ms) (0.01 min) ... ---> Elapse 1285278 ticks (359.06 ms) (0.01 min) ... ---> Elapse 1280876 ticks (357.83 ms) (0.01 min) ... ---> Elapse 1280775 ticks (357.80 ms) (0.01 min) ... ---> Elapse 1288730 ticks (360.03 ms) (0.01 min) ... ---> Elapse 1287805 ticks (359.77 ms) (0.01 min) ... ---> Elapse 1285155 ticks (359.03 ms) (0.01 min) ... Average: ---> Elapse 1284040 ticks (358.72 ms) (0.01 min) ...
Condition 3: Each allocator allocates 1000,000 integer objects
PerAlloc | ScopeAlloc | AutoFreeAlloc | AprPools | BoostPool | BoostObjectPool | NewDelete |
1000000 | 1.24 ms | 1.30 ms | 11.37 ms | 7.23 ms | 12.71 ms | 504.43 ms |
===== AutoFreeAlloc(1000000) ===== ---> Elapse 8163 ticks (2.28 ms) (0.00 min) ... ---> Elapse 4437 ticks (1.24 ms) (0.00 min) ... ---> Elapse 4438 ticks (1.24 ms) (0.00 min) ... ---> Elapse 4437 ticks (1.24 ms) (0.00 min) ... ---> Elapse 4437 ticks (1.24 ms) (0.00 min) ... ---> Elapse 4436 ticks (1.24 ms) (0.00 min) ... ---> Elapse 4437 ticks (1.24 ms) (0.00 min) ... ---> Elapse 4437 ticks (1.24 ms) (0.00 min) ... ---> Elapse 4437 ticks (1.24 ms) (0.00 min) ... ---> Elapse 4437 ticks (1.24 ms) (0.00 min) ... ---> Elapse 4445 ticks (1.24 ms) (0.00 min) ... ---> Elapse 4438 ticks (1.24 ms) (0.00 min) ... ---> Elapse 4437 ticks (1.24 ms) (0.00 min) ... ---> Elapse 4437 ticks (1.24 ms) (0.00 min) ... ---> Elapse 4437 ticks (1.24 ms) (0.00 min) ... ---> Elapse 4438 ticks (1.24 ms) (0.00 min) ... Average: ---> Elapse 4670 ticks (1.30 ms) (0.00 min) ... ===== APR Pools(1000000) ===== ---> Elapse 51520 ticks (14.39 ms) (0.00 min) ... ---> Elapse 40975 ticks (11.45 ms) (0.00 min) ... ---> Elapse 39604 ticks (11.06 ms) (0.00 min) ... ---> Elapse 39986 ticks (11.17 ms) (0.00 min) ... ---> Elapse 39025 ticks (10.90 ms) (0.00 min) ... ---> Elapse 36528 ticks (10.20 ms) (0.00 min) ... ---> Elapse 40156 ticks (11.22 ms) (0.00 min) ... ---> Elapse 40930 ticks (11.43 ms) (0.00 min) ... ---> Elapse 42630 ticks (11.91 ms) (0.00 min) ... ---> Elapse 41942 ticks (11.72 ms) (0.00 min) ... ---> Elapse 41887 ticks (11.70 ms) (0.00 min) ... ---> Elapse 39948 ticks (11.16 ms) (0.00 min) ... ---> Elapse 36587 ticks (10.22 ms) (0.00 min) ... ---> Elapse 38959 ticks (10.88 ms) (0.00 min) ... ---> Elapse 40276 ticks (11.25 ms) (0.00 min) ... ---> Elapse 40176 ticks (11.22 ms) (0.00 min) ... Average: ---> Elapse 40695 ticks (11.37 ms) (0.00 min) ... ===== ScopeAlloc(1000000) ===== ---> Elapse 4513 ticks (1.26 ms) (0.00 min) ... ---> Elapse 4389 ticks (1.23 ms) (0.00 min) ... ---> Elapse 4388 ticks (1.23 ms) (0.00 min) ... ---> Elapse 4389 ticks (1.23 ms) (0.00 min) ... ---> Elapse 4389 ticks (1.23 ms) (0.00 min) ... ---> Elapse 4388 ticks (1.23 ms) (0.00 min) ... ---> Elapse 4388 ticks (1.23 ms) (0.00 min) ... ---> Elapse 4387 ticks (1.23 ms) (0.00 min) ... ---> Elapse 4388 ticks (1.23 ms) (0.00 min) ... ---> Elapse 4388 ticks (1.23 ms) (0.00 min) ... ---> Elapse 4388 ticks (1.23 ms) (0.00 min) ... ---> Elapse 4391 ticks (1.23 ms) (0.00 min) ... ---> Elapse 5152 ticks (1.44 ms) (0.00 min) ... ---> Elapse 4473 ticks (1.25 ms) (0.00 min) ... ---> Elapse 4414 ticks (1.23 ms) (0.00 min) ... ---> Elapse 4438 ticks (1.24 ms) (0.00 min) ... Average: ---> Elapse 4453 ticks (1.24 ms) (0.00 min) ... ===== BoostPool(1000000) ===== ---> Elapse 23058 ticks (6.44 ms) (0.00 min) ... ---> Elapse 22980 ticks (6.42 ms) (0.00 min) ... ---> Elapse 24534 ticks (6.85 ms) (0.00 min) ... ---> Elapse 23153 ticks (6.47 ms) (0.00 min) ... ---> Elapse 26381 ticks (7.37 ms) (0.00 min) ... ---> Elapse 32088 ticks (8.96 ms) (0.00 min) ... ---> Elapse 27955 ticks (7.81 ms) (0.00 min) ... ---> Elapse 27423 ticks (7.66 ms) (0.00 min) ... ---> Elapse 22488 ticks (6.28 ms) (0.00 min) ... ---> Elapse 29019 ticks (8.11 ms) (0.00 min) ... ---> Elapse 28190 ticks (7.88 ms) (0.00 min) ... ---> Elapse 24996 ticks (6.98 ms) (0.00 min) ... ---> Elapse 30767 ticks (8.60 ms) (0.00 min) ... ---> Elapse 23616 ticks (6.60 ms) (0.00 min) ... ---> Elapse 24325 ticks (6.80 ms) (0.00 min) ... ---> Elapse 23059 ticks (6.44 ms) (0.00 min) ... Average: ---> Elapse 25877 ticks (7.23 ms) (0.00 min) ... ===== BoostObjectPool(1000000) ===== ---> Elapse 45284 ticks (12.65 ms) (0.00 min) ... ---> Elapse 50790 ticks (14.19 ms) (0.00 min) ... ---> Elapse 44214 ticks (12.35 ms) (0.00 min) ... ---> Elapse 42826 ticks (11.96 ms) (0.00 min) ... ---> Elapse 44544 ticks (12.44 ms) (0.00 min) ... ---> Elapse 43093 ticks (12.04 ms) (0.00 min) ... ---> Elapse 43254 ticks (12.08 ms) (0.00 min) ... ---> Elapse 44750 ticks (12.50 ms) (0.00 min) ... ---> Elapse 49610 ticks (13.86 ms) (0.00 min) ... ---> Elapse 44001 ticks (12.29 ms) (0.00 min) ... ---> Elapse 42755 ticks (11.94 ms) (0.00 min) ... ---> Elapse 48352 ticks (13.51 ms) (0.00 min) ... ---> Elapse 44869 ticks (12.53 ms) (0.00 min) ... ---> Elapse 51176 ticks (14.30 ms) (0.00 min) ... ---> Elapse 44416 ticks (12.41 ms) (0.00 min) ... ---> Elapse 44242 ticks (12.36 ms) (0.00 min) ... Average: ---> Elapse 45511 ticks (12.71 ms) (0.00 min) ... ===== NewDelete(1000000) ===== ---> Elapse 1716231 ticks (479.46 ms) (0.01 min) ... ---> Elapse 1819374 ticks (508.27 ms) (0.01 min) ... ---> Elapse 1805179 ticks (504.30 ms) (0.01 min) ... ---> Elapse 1805174 ticks (504.30 ms) (0.01 min) ... ---> Elapse 1803941 ticks (503.96 ms) (0.01 min) ... ---> Elapse 1811651 ticks (506.11 ms) (0.01 min) ... ---> Elapse 1807130 ticks (504.85 ms) (0.01 min) ... ---> Elapse 1812310 ticks (506.30 ms) (0.01 min) ... ---> Elapse 1801756 ticks (503.35 ms) (0.01 min) ... ---> Elapse 1810765 ticks (505.86 ms) (0.01 min) ... ---> Elapse 1804274 ticks (504.05 ms) (0.01 min) ... ---> Elapse 1812004 ticks (506.21 ms) (0.01 min) ... ---> Elapse 1822470 ticks (509.13 ms) (0.01 min) ... ---> Elapse 1815900 ticks (507.30 ms) (0.01 min) ... ---> Elapse 1818020 ticks (507.89 ms) (0.01 min) ... ---> Elapse 1823920 ticks (509.54 ms) (0.01 min) ... Average: ---> Elapse 1805631 ticks (504.43 ms) (0.01 min) ...
Conclusion
ScopeAlloc has the best performance in any condition. And if we allocate enough objects, performance of AutoFreeAlloc is close to ScopeAlloc.