Erlang 17.5發(fā)布引入控制進(jìn)程默認(rèn)字典大小的命令行參數(shù):
Erlang/OTP 17.5 has been released
Written by Henrik, 01 Apr 2015
Some highlights of the release are:
ERTS: Added command line argument option for setting the initial size of process dictionaries.
源碼變化參看:
文檔:
這個+hpds參數(shù)默認(rèn)是字典有10個槽位,由于典型的Erlang VM內(nèi)有成千上萬的進(jìn)程,官方又不鼓勵使用字典,因為破壞fp語義,所以這些默認(rèn)的字典占用的內(nèi)存是浪費(fèi)掉了。 挑小了對于內(nèi)存敏感的嵌入式機(jī)器還是挺可觀的;調(diào)大了對字典性能有一定的提升。
祝玩得開心!
更多信息請查看IT技術(shù)專欄