Finally, I have the opportunity to have the motivation to view jjhou's STL source code parsing. It is expected that the entire book will be read in the fast-reading mode. The underlying mechanisms of map and set are RB-Tree (red-black Tree), and insertion and search are O (lgN) complexity. Map and set have been heard before, but they are never used, because they do not know what is behind them. I read this book to learn about it.
Finally, I have the opportunity to have the motivation to view jjhou's STL source code parsing. It is expected that the entire book will be read in the fast-reading mode. The underlying mechanisms of map and set are RB-Tree (red-black Tree), and insertion and search are O (lgN) complexity. Map and set have been heard before, but they are never used, because they do not know what is behind them. I read this book to learn about it.
Finally, I have the opportunity to have the motivation to view jjhou's STL source code parsing. It is expected that the entire book will be read in the fast-reading mode.
The underlying mechanisms of map and set are RB-Tree (red-black Tree), and insertion and search are O (lgN) complexity. Map and set have been heard before, but they are never used, because they do not know what is behind them. I have read this book to understand the mechanisms behind it and may be used in the future.
Multimap and multiset are nothing but small modifications to map and set.
In addition, there are hash_map and hash_set. The underlying mechanism is not RB-Tree, but hash table.
After learning about this, map and set are all mysterious and controllable.
There is another point that needs to be explored: memory management. How can we customize the simple_allocator line of STL? Let's take a look.
The best reference for stl is cplusplus.com.
Let's talk about OceanBase and STL.
In OceanBase, there is almost no function provided by stl, basically repeating the "Wheel of invention", but this invention seems reasonable to some extent, for example: customization of return codes and Error Codes provides great flexibility. The customization of memory usage is also much larger. In addition, it is also lightweight. In addition, STL interfaces also have a headache. A large piece of code is switched around the interface, and there are also ways to avoid it. It looks much better to use typedef. Why does OceanBase not use STL? I think the essence is that we have a group of awesome engineers who can write the tested underlying code.