Concurrent map of go concurrent Security Map
Source code interpretationThe readme of concurrent map says that this is a high-performance concurrent security map. Let's look at the source code to explain how it achieves high performance.https://github.com/orcaman/concurrent-map/blob/master/concurrent_map.goThe source code is quite concise, only 343 lines. Let's first look at how to design ...
Posted by Sturm on Sun, 05 Dec 2021 21:57:17 +0100
freeswitch APR library hash table
summary
The core source code of freeswitch is developed based on apr library, which has good portability on different systems.
Hash table is widely used in development. The main scenario is the logic that requires high query efficiency. It is a typical data structure implementation of space for time.
Most of the underlying libraries hav ...
Posted by racing_fire on Wed, 01 Dec 2021 08:51:41 +0100
HashMap thread is not safe, the most simple and understandable article
preface
HashMap has always been a classic topic that must be asked in the interview. We can't just use it for use. We should also be clear about the underlying principles and possible problems. There are many explanations on HashMap thread safety on the Internet. Why should I talk about this article? Because I want to be more simple and clear. ...
Posted by amites on Wed, 17 Nov 2021 06:34:05 +0100
Source code analysis of HashMap and concurrent HashMap in Java 7 / 8
Java7 HashMap
HashMap is the simplest. First, we are very familiar with it. Second, it does not support concurrent operations, so the source code is also very simple.
First, let's use the following figure to introduce the structure of HashMap.
This is only a schematic diagram, because it does not take into account the expansion of the ar ...
Posted by gingerboy101 on Wed, 06 Oct 2021 22:16:03 +0200
The difference between HashMap in JDK1.8 and JDK1.7 (detailed)
The difference between HashMap in JDK1.8 and JDK1.7
conclusion
First of all, the biggest difference between HashMap in 1.7 and 1.8 is the change of underlying data structure. The underlying data structure used by HashMap in 1.7 is the form of array + Chain table, whereas in 1.8 HashMap uses the data structure of array + Chain Table + red-blac ...
Posted by adamhhh on Mon, 20 Sep 2021 14:07:14 +0200