https://github.com/softstonedevelop/serializerlist
Another test task from a nameless company with great ambitions, recognized market leaders and blah blah .. .
https://github.com/softstonedevelop/serializerlist
Last synced: 5 months ago
JSON representation
Another test task from a nameless company with great ambitions, recognized market leaders and blah blah .. .
- Host: GitHub
- URL: https://github.com/softstonedevelop/serializerlist
- Owner: SoftStoneDevelop
- License: mit
- Created: 2021-04-15T19:00:34.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-07-13T01:31:53.000Z (over 2 years ago)
- Last Synced: 2023-07-13T02:24:02.037Z (over 2 years ago)
- Language: C#
- Homepage:
- Size: 1.37 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Given on assignment: Exist interface "IListSerializer" and class "ListNode".
Task: to implement "IListSerializer" with as efficient methods as possible and with minimal memory allocation.
## Benchmark:
| Method | Size | Mean | Ratio | Completed Work Items | Lock Contentions | Allocated |
|------------------------------------------------- |------ |---------------:|------:|---------------------:|-----------------:|-----------:|
| **'V1: single thread algorithm on Dictionary'** | **1000** | **661.5 μs** | **1.00** | **1.0000** | **0.0010** | **1.6 MB** |
| 'V2(smallest by memory): multi thread algorithm' | 1000 | 2,053.9 μs | 3.10 | 59.0000 | - | 1.48 MB |
| 'V3 (compromise): multi thread algorithm)' | 1000 | 746.8 μs | 1.13 | 59.0000 | 0.0088 | 1.5 MB |
| | | | | | | |
| **'V1: single thread algorithm on Dictionary'** | **2500** | **5,156.3 μs** | **1.00** | **1.0000** | **-** | **10.95 MB** |
| 'V2(smallest by memory): multi thread algorithm' | 2500 | 13,927.5 μs | 2.55 | 59.0000 | - | 10.64 MB |
| 'V3 (compromise): multi thread algorithm)' | 2500 | 5,190.5 μs | 0.96 | 59.0000 | - | 10.72 MB |
| | | | | | | |
| **'V1: single thread algorithm on Dictionary'** | **5000** | **23,710.2 μs** | **1.00** | **1.0000** | **-** | **42.68 MB** |
| 'V2(smallest by memory): multi thread algorithm' | 5000 | 49,084.5 μs | 2.08 | 59.0000 | - | 42.03 MB |
| 'V3 (compromise): multi thread algorithm)' | 5000 | 19,846.0 μs | 0.84 | 59.0000 | - | 42.19 MB |
| | | | | | | |
| **'V1: single thread algorithm on Dictionary'** | **10000** | **57,550.0 μs** | **1.00** | **1.0000** | **-** | **168.28 MB** |
| 'V2(smallest by memory): multi thread algorithm' | 10000 | 193,388.9 μs | 3.36 | 59.0000 | - | 166.97 MB |
| 'V3 (compromise): multi thread algorithm)' | 10000 | 63,795.9 μs | 1.11 | 59.0000 | - | 167.29 MB |
| | | | | | | |
| **'V1: single thread algorithm on Dictionary'** | **50000** | **947,925.7 μs** | **1.00** | **1.0000** | **-** | **3012.49 MB** |
| 'V2(smallest by memory): multi thread algorithm' | 50000 | 4,590,753.2 μs | 4.84 | 59.0000 | - | 3006.37 MB |
| 'V3 (compromise): multi thread algorithm)' | 50000 | 1,041,195.0 μs | 1.10 | 59.0000 | - | 3007.87 MB |