I construct three internal tables with different table types:
![](https://img.laitimes.com/img/__Qf2AjLwojIjJCLyojI0JCLicmbw5SN1QDOmNjZkRzM0IGMlRDOwETN0MTM4QzMjhzYxQTOh9CX5d2bs92Yl1iclB3bsVmdlR2LcNWaw9CXt92Yu4GZjlGbh5yYjV3Lc9CX6MHc0RHaiojIsJye.png)
The complete test source code could be found in the end part of the blog.
insert operation comparison
The hashed table is least efficient since additional overhead is paid to maintain the internal administrative information for hash logic.
The standard table is fastest due to the fact that there is no overhead.
read operation comparison
The standard table read is slowest due to o(n) complexity.
If we exclude the standard table read and compare the left three, it is clear the hashed table read is most efficient.
The complete test source code: