gb_tree dict proplist orddict
Table of Contents
and or andalso orelse
Expr1 orelse Expr2 Expr2可能被短路, 不运算
Expr1 or Expr2 Expr2一定会被运算
Expr1 andalso Expr2 Expr2一定会被运算
Expr1 and Expr2 Expr2可能被短路, 不运算
Key-Value 存储
对于小数据量, 有proplist 和 orddict
对于大数据量 有dicts gb_trees
- dicts 适于读多于写的
Dicts are thus very good choices to scale orddicts up whenever it is needed.
- gb_trees适于写多于读的
正常的gb_trees:enter/2, gb_trees:lookup/2 and gb_trees:delete_any/2
smart 的:gb_trees:insert/3, gb_trees:get/2, gb_trees:update/3 and gb_trees:delete/2.
smart的之处在于,它认为要处理的key在 gb_trees中存在,所以一些检查不必做,速度会快一点。
https://github.com/jixiuf/helloerlang/tree/master/benchmark/src