1
- # [ FriendlyCSharp.Databases] ( https://github.com/FriendlyCSharp/Databases )
1
+ # FriendlyCSharp.Databases
2
2
3
3
A library of cross platform C# data structures. Generic [ ** B-tree** ] ( https://en.wikipedia.org/wiki/B-tree ) written in C#, which can be replaced with NoSQL database stored in the memory of discharge requirements in real-time (* Firebase, Redis Cache, SAP HANA, Exadata, OLTP, etc.* ). Basic information B-tree can be found in the book N. Wirth, Algorithms + data structures = programs and on Wikipedia, namely:
4
4
> "* In computer science, a B-tree is a self-balancing tree data structure that keeps data sorted and allows searches, sequential access, insertions, and deletions in logarithmic time. The B-tree is a generalization of a binary search tree in that a node can have more than two children (Comer 1979, p. 123). Unlike self-balancing binary search trees, the B-tree is optimized for systems that read and write large blocks of data. B-trees are a good example of a data structure for external memory. It is commonly used in databases and filesystems. (...) Rudolf Bayer and Ed McCreight invented the B-tree while working at Boeing Research Labs in 1971 (Bayer & McCreight 1972), but they did not explain what, if anything, the B stands for.* " -  ; [ Wikipedia] ( https://en.wikipedia.org/wiki/B-tree ) .
5
5
6
6
  ;
7
7
## B-Tree generic class
8
- #### [ FcsBTreeN< ; TKey, TValue> ; ] ( FcsBTreeN.cs )
8
+ #### [ FcsBTreeN< ; TKey, TValue> ; ] ( https://github.com/inmem/FriendlyCSharp.Databases )
9
9
+ ` Methods: ` BtnCompares, BtnUpdates, BtnAdd, BtnDeleteAll, BtnFind, BtnFirst, BtnLast, BtnNext, BtnPrev, BtnSearch, BtnSearchPrev, BtnUpdate and BtnUsedKeys.
10
- #### [ FcsFastBTreeN< ; TKey, TValue> ; ] ( FcsFastBTreeN.cs )
10
+ #### [ FcsFastBTreeN< ; TKey, TValue> ; ] ( https://github.com/inmem/FriendlyCSharp.Databases )
11
11
+ ` Methods: ` BtnCompares, BtnUpdates, BtnAdd, BtnDeleteAll, BtnFind, BtnFirst, BtnLast, BtnNext, BtnPrev, BtnSearch, BtnSearchPrev, BtnUpdate and BtnUsedKeys.
12
12
+ ` Methods: ` BtnFastFind, BtnFastFirst, BtnFastLast, BtnFastNext, BtnFastPrev, BtnFastSearch, BtnFastSearchPrev.
13
- #### [ FcsLockBTreeN< ; TKey, TValue> ; ] ( FcsLockBTreeN.cs )
13
+ #### [ FcsLockBTreeN< ; TKey, TValue> ; ] ( https://github.com/inmem/FriendlyCSharp.Databases )
14
14
+ ` Methods: ` BtnCompares, BtnUpdates, BtnAdd, BtnDeleteAll, BtnFind, BtnFirst, BtnLast, BtnNext, BtnPrev, BtnSearch, BtnSearchPrev, BtnUpdate and BtnUsedKeys.
15
- #### [ FcsFastLockBTreeN< ; TKey, TValue> ; ] ( FcsFastLockBTreeN.cs )
15
+ #### [ FcsFastLockBTreeN< ; TKey, TValue> ; ] ( https://github.com/inmem/FriendlyCSharp.Databases )
16
16
+ ` Methods: ` BtnCompares, BtnUpdates, BtnAdd, BtnDeleteAll, BtnFind, BtnFirst, BtnLast, BtnNext, BtnPrev, BtnSearch, BtnSearchPrev, BtnUpdate and BtnUsedKeys.
17
17
+ ` Methods: ` BtnFastFind, BtnFastFirst, BtnFastLast, BtnFastNext, BtnFastPrev, BtnFastSearch, BtnFastSearchPrev.
18
18
19
19
### Source code
20
- See the [ Github] ( https://github.com/FriendlyCSharp/ Databases ) .
20
+ See the [ Github] ( https://github.com/inmem/FriendlyCSharp. Databases ) .
21
21
22
22
### Performance
23
23
A [ ** B-tree** ] ( https://en.wikipedia.org/wiki/B-tree ) of order m is a tree which satisfies the following properties:
@@ -41,15 +41,15 @@ A [**B-tree**](https://en.wikipedia.org/wiki/B-tree) of order m is a tree which
41
41
### Benchmark
42
42
The benchmark was configured as follows:
43
43
* CPU: Intel Xeon E3-1245 @ 3.3 GHz;
44
- * Windows 10, 64bit, .NET Standard 1.2
44
+ * Windows 10, 64bit, .NET Standard 1.1
45
45
* 4x4GB DDR3 Kingston @ 1333 MHz
46
46
47
47
> ** Adding in a single thread:**
48
48
49
49
| < ; int, uint> ; | sorted by  ; key | iteration | total  ; (ms) | one time (ns) | speed | RAM  ; (MB) | occupied |
50
50
| --- | :---: | ---: | ---: | ---: | :---: | :---: | :---: |
51
51
| [ ** FcsFastBTreeN< ; ...> ; ** ] ( #fcsfastbtreentkey-tvalue ) | ** Yes** | 10,000,000 | ** 6,185** | ** 619** | ** 100%** | ** 128** | ** 100%** |
52
- | SortedSet< ; ...> ; | ** Yes** | 10,000,000 | ~~   ; 19,443  ; ~~ | ~~   ; 1,944  ; ~~ | ~~   ; 32%  ; ~~ | ~~   ; 458  ; ~~ | ~~   ; 358%  ; ~~ |
52
+ | SortedSet< ; ...> ; | ** Yes** | 10,000,000 | ~~   ; 19,443  ; ~~ | ~~   ; 1,944  ; ~~ | ~~   ; 32%  ; ~~ | ~~   ; 458  ; ~~ |   ; 358%  ; |
53
53
| HashSet< ; ...> ; | No | 10,000,000 | 2,017 | 202 | 307% | 229 | 179% |
54
54
| Dictionary< ; ...> ; | No | 10,000,000 | 1,378 | 138 | 449% | 229 | 179% |
55
55
@@ -65,20 +65,20 @@ The benchmark was configured as follows:
65
65
66
66
  ;
67
67
### MemoryStream generic class
68
- #### [ FcsInmemStream< ; T> ; ] ( FcsInmemStream.cs ) \[ where T : struct\]
68
+ #### [ FcsInmemStream< ; T> ; ] ( https://github.com/inmem/FriendlyCSharp.Databases ) \[ where T : struct\]
69
69
+ ` Methods: ` Append, Close, Length, Open, Position, Read, Seek, Write.
70
70
71
71
### Source code
72
- See the [ Github] ( https://github.com/FriendlyCSharp/ Databases ) .
72
+ See the [ Github] ( https://github.com/inmem/FriendlyCSharp. Databases ) .
73
73
74
74
### Benchmark
75
75
The benchmark was configured as follows:
76
76
* CPU: Intel Xeon E3-1245 @ 3.3 GHz;
77
- * Windows 10, 64bit, .NET Standard 1.2
77
+ * Windows 10, 64bit, .NET Standard 1.1
78
78
* 4x4 GB DDR3 Kingston @ 1333 MHz
79
79
* Append, Read, Write (* cache 1,000 T* ) and foreach (* cache 128 T* )
80
80
81
- | [ FcsInmemStream< ; T> ; ] ( FcsInmemStream.cs ) | Append | Read | Write | foreach |
81
+ | [ FcsInmemStream< ; T> ; ] ( https://github.com/inmem/FriendlyCSharp.Databases ) | Append | Read | Write | foreach |
82
82
| --- | ---: | ---: | ---: | ---: |
83
83
| IOPS \[ T = 8 Byte\] | ** 160** ,000,000 | ** 800** ,000,000 | ** 800** ,000,000 | 80,000,000 |
84
84
| IOPS \[ T = 16 Byte\] | ** 140** ,000,000 | ** 500** ,000,000 | ** 400** ,000,000 | 80,000,000 |
0 commit comments