Open source conceptual resources to develop distributed, scalable, multi tenant web application in N-Tier architecture. Front tier with single code base hybrid web assembly, android, windows clients. Application tier with application server. Service tier with administration server and operational data services. Data tier with database stores (available: npgsql, mysql, mariadb, sqlserver, oracle, mongo, sqlite, cosmodb, azuresql, inmemorydb) and blob/file storages.
Benchamrks performed and specialized for Undersoft SDK usage and purpose and for them results show that Undersoft SDK is ~ 5 times faster with ~ 5 times less RAM usage then .NET Standard Collections and Parallel Math operations on IEnumerables
BenchmarkDotNet=v0.13.1, OS=Windows 10.0.19045 Intel Core i7-4700MQ CPU 2.40GHz (Haswell), 1 CPU, 8 logical and 4 physical cores .NET SDK=8.0.200 [Host] : .NET 8.0.2 (8.0.224.6711), X64 RyuJIT [AttachedDebugger] DefaultJob : .NET 8.0.2 (8.0.224.6711), X64 RyuJIT
Method (10 mln objects) | Mean | Error | StdDev | Rank | Gen 0 | Allocated |
---|---|---|---|---|---|---|
Instant_Series_Undersoft_Math_AsParallel | 309.5 ms | 5.76 ms | 5.66 ms | 1 | 76000 | 229 MB |
Instant_Series_DotNet_Math_AsParellel | 2,028.9 ms | 39.79 ms | 60.76 ms | 2 | 535000 | 1,602 MB |
Instant_Proxies_Undersoft_Math_AsParallel | 327.7 ms | 5.67 ms | 6.53 ms | 1 | 76500 | 229 MB |
Instant_Proxies_DotNet_Math_AsParellel | 2,490.4 ms | 21.73 ms | 18.14 ms | 2 | 535000 | 1,602 MB |
Undersoft.SDK data structures:
- Chain (ordered, not-thread-safe, not-indexed, queued, keyed, repeatable)
- Catalog (ordered, thread-safe, not-indexed, queued, keyed, repeatable)
- Listing (ordered, not-thread-safe, indexed, queued, keyed, repeatable)
- Registry (ordered, thread-safe, indexed, queued, keyed, repeatable)
System.Collections.Generic data structures:
- ConcurrentDictionary (not-ordered, thread-safe, not-indexed, not-queued, keyed, not-repeatable)
- OrderedDictionary (ordered, not-thread-safe, indexed, not-queued, keyed, not-repeatable)
- Dictionary (not-ordered, not-thread-safe, not-indexed, not-queued, keyed, not-repeatable)
Method (10 concurrent tasks each 100K objects) | Mean | Error | StdDev | Median | Rank | Gen 0 | Gen 1 | Allocated |
---|---|---|---|---|---|---|---|---|
Catalog_Add | 1,416.55 ms | 236.30 ms | 61.367 ms | 1,424.28 ms | 6 | 20000 | 10000 | 199 MB |
Catalog_AddOrUpdate | 1,224.97 ms | 178.81 ms | 46.437 ms | 1,216.00 ms | 5 | 10000 | 5000 | 118 MB |
Catalog_ContainsKey | 60.65 ms | 19.14 ms | 4.971 ms | 58.67 ms | 1 | - | - | 31 MB |
Catalog_GetByKey | 195.04 ms | 39.81 ms | 10.339 ms | 191.40 ms | 3 | - | - | 31 MB |
Catalog_GetOrAdd | 1,045.72 ms | 190.98 ms | 49.598 ms | 1,025.00 ms | 4 | 10000 | 5000 | 118 MB |
Catalog_Iteration | 191.60 ms | 398.34 ms | 103.448 ms | 142.97 ms | 3 | - | - | 31 MB |
Catalog_Remove | 122.05 ms | 22.19 ms | 5.763 ms | 119.63 ms | 2 | - | - | 31 MB |
Catalog_SetByKey | 215.20 ms | 36.67 ms | 9.523 ms | 210.73 ms | 3 | - | - | 31 MB |
Catalog_TryGetByKey | 197.87 ms | 50.83 ms | 13.200 ms | 190.54 ms | 3 | - | - | 31 MB |
Registry_Add | 1,532.15 ms | 188.53 ms | 48.961 ms | 1,523.63 ms | 7 | 21000 | 10000 | 217 MB |
Registry_AddOrUpdate | 1,085.43 ms | 148.56 ms | 38.581 ms | 1,078.40 ms | 4 | 10000 | 5000 | 128 MB |
Registry_ContainsKey | 60.74 ms | 21.25 ms | 5.519 ms | 57.64 ms | 1 | - | - | 31 MB |
Registry_GetByKey | 210.57 ms | 72.67 ms | 18.873 ms | 208.03 ms | 3 | - | - | 31 MB |
Registry_GetOrAdd | 997.04 ms | 105.59 ms | 27.421 ms | 991.91 ms | 4 | 10000 | 5000 | 128 MB |
Registry_Iteration | 162.31 ms | 106.05 ms | 27.541 ms | 146.92 ms | 3 | - | - | 31 MB |
Registry_Remove | 123.73 ms | 25.34 ms | 6.580 ms | 124.04 ms | 2 | - | - | 31 MB |
Registry_SetByKey | 208.29 ms | 60.35 ms | 15.672 ms | 203.98 ms | 3 | - | - | 31 MB |
Registry_TryGetByKey | 190.18 ms | 29.59 ms | 7.684 ms | 188.66 ms | 3 | - | - | 31 MB |
ConcurrentDictionary_Add | 1,979.11 ms | 346.71 ms | 90.040 ms | 1,979.77 ms | 8 | 84000 | 31000 | 577 MB |
ConcurrentDictionary_AddOrUpdate | 1,228.47 ms | 202.59 ms | 52.611 ms | 1,209.23 ms | 5 | 101000 | 28000 | 648 MB |
ConcurrentDictionary_ContainsKey | 203.32 ms | 48.06 ms | 12.482 ms | 201.00 ms | 3 | 107000 | - | 351 MB |
ConcurrentDictionary_GetByKey | 214.59 ms | 99.61 ms | 25.868 ms | 220.30 ms | 3 | 107000 | - | 351 MB |
ConcurrentDictionary_GetOrAdd | 1,082.26 ms | 174.55 ms | 45.330 ms | 1,075.29 ms | 4 | 69000 | 22000 | 465 MB |
ConcurrentDictionary_Iteration | 242.47 ms | 396.37 ms | 102.937 ms | 181.28 ms | 3 | - | - | 31 MB |
ConcurrentDictionary_Remove | 160.96 ms | 73.52 ms | 19.093 ms | 152.38 ms | 3 | 52000 | 1000 | 191 MB |
ConcurrentDictionary_SetByKey | 236.14 ms | 98.28 ms | 25.524 ms | 222.56 ms | 3 | 107000 | - | 351 MB |
ConcurrentDictionary_TryGetByKey | 200.36 ms | 81.21 ms | 21.089 ms | 200.08 ms | 3 | 107000 | - | 351 MB |
Method (1 mln objects) | Mean | Error | StdDev | Rank | Gen 0 | Gen 1 | Allocated |
---|---|---|---|---|---|---|---|
Dictionary_Add_Test | 1,749.7 ms | 400.47 ms | 104.00 ms | 5 | 128000 | - | 533 MB |
OrderedDictionary_Add_Test | 2,070.1 ms | 269.37 ms | 69.95 ms | 6 | 61000 | 16000 | 529 MB |
ConcurrentDictionary_Add_Test | 4,343.0 ms | 1,205.17 ms | 312.98 ms | 7 | 84000 | 26000 | 546 MB |
Chain_Add_Test | 719.0 ms | 185.91 ms | 48.28 ms | 1 | 20000 | 10000 | 154 MB |
Catalog_Add_Test | 923.9 ms | 95.30 ms | 24.75 ms | 3 | 20000 | 10000 | 168 MB |
Listing_Add_Test | 818.5 ms | 130.86 ms | 33.99 ms | 2 | 20000 | 10000 | 186 MB |
Registry_Add_Test | 999.1 ms | 139.11 ms | 36.13 ms | 4 | 20000 | 10000 | 186 MB |
Method (1 mln objects) | Mean | Error | StdDev | Rank | Gen 0 | Allocated |
---|---|---|---|---|---|---|
Dictionary_GetByKey_Test | 924.9 ms | 73.96 ms | 19.21 ms | 2 | 168000 | 504 MB |
OrderedDictionary_GetByKey_Test | 675.6 ms | 272.82 ms | 70.85 ms | 1 | 96000 | 290 MB |
ConcurrentDictionary_GetByKey_Test | 1,253.3 ms | 392.78 ms | 102.00 ms | 3 | 168000 | 504 MB |
Chain_GetByKey_Test | 212.2 ms | 68.58 ms | 17.81 ms | 1 | - | - |
Catalog_GetByKey_Test | 273.8 ms | 9.34 ms | 2.43 ms | 2 | - | 12,448 B |
Listing_GetByKey_Test | 206.8 ms | 5.54 ms | 1.44 ms | 1 | - | - |
Registry_GetByKey_Test | 284.9 ms | 57.66 ms | 14.97 ms | 2 | - | 12,160 B |
Method (1 mln objects) | Mean | Error | StdDev | Rank | Gen 0 | Gen 1 | Allocated |
---|---|---|---|---|---|---|---|
OrderedDictionary_SetByKey_Test | 4,139.2 ms | 3,754.28 ms | 974.97 ms | 6 | 107000 | 26000 | 675,424,640 B |
Dictionary_SetByKey_Test | 1,024.7 ms | 283.61 ms | 73.65 ms | 4 | 168000 | - | 528,012,400 B |
ConcurrentDictionary_SetByKey_Test | 1,276.1 ms | 107.57 ms | 27.93 ms | 5 | 168000 | - | 528,012,160 B |
Chain_SetByKey_Test | 212.3 ms | 14.36 ms | 3.73 ms | 1 | - | - | - |
Catalog_SetByKey_Test | 286.2 ms | 36.30 ms | 9.43 ms | 3 | - | - | 12,160 B |
Listing_SetByKey_Test | 209.6 ms | 10.50 ms | 2.73 ms | 1 | - | - | 12,160 B |
Registry_SetByKey_Test | 271.6 ms | 18.34 ms | 4.76 ms | 2 | - | - | - |
Method (1 mln objects) | Mean | Error | StdDev | Rank | Gen 0 | Allocated |
---|---|---|---|---|---|---|
Dictionary_ContainsKey_Test | 957.6 ms | 104.59 ms | 27.16 ms | 3 | 168000 | 528,012,160 B |
OrderedDictionary_ContainsKey_Test | 678.5 ms | 302.66 ms | 78.60 ms | 2 | 96000 | 304,006,656 B |
ConcurrentDictionary_ContainsKey_Test | 1,147.2 ms | 125.92 ms | 32.70 ms | 4 | 168000 | 528,012,160 B |
Chain_ContainsKey_Test | 207.2 ms | 28.16 ms | 7.31 ms | 1 | - | - |
Catalog_ContainsKey_Test | 203.0 ms | 35.18 ms | 9.14 ms | 1 | - | - |
Listing_ContainsKey_Test | 199.2 ms | 53.65 ms | 13.93 ms | 1 | - | - |
Registry_ContainsKey_Test | 214.3 ms | 17.66 ms | 4.59 ms | 1 | - | - |
Method (1 mln objects) | Mean | Error | StdDev | Rank | Gen 0 | Gen 1 | Allocated |
---|---|---|---|---|---|---|---|
Dictionary_Remove_Test | 1,006.4 ms | 25.72 ms | 6.68 ms | 3 | 158000 | 1000 | 478 MB |
ConcurrentDictionary_Remove_Test | 1,497.5 ms | 817.11 ms | 212.20 ms | 4 | 158000 | 1000 | 478 MB |
Chain_Remove_Test | 342.7 ms | 141.28 ms | 36.69 ms | 1 | - | - | 18 MB |
Catalog_Remove_Test | 597.7 ms | 457.69 ms | 118.86 ms | 2 | - | - | 26 MB |
Listing_Remove_Test | 353.0 ms | 385.37 ms | 100.08 ms | 1 | - | - | 37 MB |
Registry_Remove_Test | 526.5 ms | 82.80 ms | 21.50 ms | 2 | - | - | 37 MB |
Method (10K objects) | Mean | Error | StdDev | Median | Rank | Allocated |
---|---|---|---|---|---|---|
Chain_ContainsValue_Test | 631.6 μs | 1,889.6 μs | 490.7 μs | 403.1 μs | 1 | 70,160 B |
Catalog_ContainsValue_Test | 837.1 μs | 3,238.9 μs | 841.1 μs | 494.4 μs | 1 | 69,872 B |
Listing_ContainsValue_Test | 832.6 μs | 2,829.0 μs | 734.7 μs | 548.9 μs | 1 | 70,400 B |
Registry_ContainsValue_Test | 1,622.2 μs | 4,626.7 μs | 1,201.5 μs | 971.4 μs | 2 | 70,112 B |
List_ContainsValue_Test | 23,234.8 μs | 10,714.2 μs | 2,782.4 μs | 23,374.9 μs | 3 | - |
Dictionary_ContainsValue_Test | 24,653.2 μs | 37,045.9 μs | 9,620.7 μs | 19,812.0 μs | 3 | - |
Method (1 mln objects) | Mean | Error | StdDev | Rank | Gen 0 | Allocated |
---|---|---|---|---|---|---|
Chain_Iteration_Test | 94.42 ms | 31.58 ms | 8.201 ms | 2 | - | - |
Catalog_Iteration_Test | 90.14 ms | 19.59 ms | 5.087 ms | 2 | - | 12,144 B |
Listing_Iteration_Test | 94.20 ms | 28.26 ms | 7.340 ms | 2 | - | - |
Registry_Iteration_Test | 95.31 ms | 43.38 ms | 11.266 ms | 2 | - | - |
Dictionary_Iteration_Test | 60.94 ms | 36.02 ms | 9.354 ms | 1 | - | - |
OrderedDictionary_Iteration_Test | 217.26 ms | 72.03 ms | 18.707 ms | 3 | 40000 | 128,006,208 B |
ConcurrentDictionary_Iteration_Test | 449.44 ms | 149.87 ms | 38.921 ms | 4 | - | - |