ETS新的压缩特性
即将发布的R14B01要支持ets的压缩,更大程度的提高内存的利用率。
在github上可以看到这个分支,有兴趣的同学可以下载下来看看。
压缩的时候只压缩value, key是不压缩的。 value特别简单类型的eterm也是不压缩的,因为zip压缩需要一定长度的内容,而且压缩本身也要加入一点的overload.
以下是sverker (author)的提交log.
ETS ‘compressed’ option.
The compressed format is using a slighty modified variant of the extern format
(term_to_binary). To not worsen key lookup’s too much, the top tuple itself
and the key element are not compressed. Table objects with only immediate
non-key elements will therefor not gain anything (but actually consume one
extra word for “alloc_size”).
我们来试验下吧:
Read more…
Post Footer automatically generated by wp-posturl plugin for wordpress.
Recent Comments