diff options
author | mfederico <mfederico@1f5c12ca-751b-0410-a591-d2e778427230> | 2006-08-14 06:50:27 +0400 |
---|---|---|
committer | mfederico <mfederico@1f5c12ca-751b-0410-a591-d2e778427230> | 2006-08-14 06:50:27 +0400 |
commit | fdee18ff883e2200a8a9107fa587f06ad2f54c10 (patch) | |
tree | c83c3d2eae5858e4231df73636722ae74f0713ac /irstlm | |
parent | d0a573bc517d11deebea1bafbb91bacc5dfa8ab5 (diff) |
tuning of cache use
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@706 1f5c12ca-751b-0410-a591-d2e778427230
Diffstat (limited to 'irstlm')
-rw-r--r-- | irstlm/src/ngramcache.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/irstlm/src/ngramcache.cpp b/irstlm/src/ngramcache.cpp index 3b9ea1e2f..271be4cf1 100644 --- a/irstlm/src/ngramcache.cpp +++ b/irstlm/src/ngramcache.cpp @@ -34,7 +34,7 @@ ngramcache::ngramcache(int n,int size,int maxentries){ infosize=size; maxn=maxentries; entries=0; - ht=new htable(maxn * 5, ngsize * sizeof(int),INT,NULL); //lower load factor to reduce collisions + ht=new htable(maxn * 2, ngsize * sizeof(int),INT,NULL); //lower load factor to reduce collisions mp=new mempool(ngsize * sizeof(int)+infosize,maxn/5); accesses=0; hits=0; @@ -50,7 +50,7 @@ ngramcache::~ngramcache(){ void ngramcache::reset(){ ht->stat(); delete ht;delete mp; - ht=new htable(maxn * 5, ngsize * sizeof(int),INT,NULL); //load factor 2 + ht=new htable(maxn * 2, ngsize * sizeof(int),INT,NULL); //load factor 2 mp=new mempool(ngsize * sizeof(int)+infosize,maxn/5); entries=0; } |