Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormfederico <mfederico@1f5c12ca-751b-0410-a591-d2e778427230>2006-08-12 02:22:23 +0400
committermfederico <mfederico@1f5c12ca-751b-0410-a591-d2e778427230>2006-08-12 02:22:23 +0400
commit1898ce03b47c1f25ea72d139c526b256712408a6 (patch)
tree0006c673d1c1f199aa41c906505a34892f429238 /irstlm/src/ngramcache.cpp
parente6914693a147b35866f052ec2f0719619daa6045 (diff)
No log message.
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@669 1f5c12ca-751b-0410-a591-d2e778427230
Diffstat (limited to 'irstlm/src/ngramcache.cpp')
-rw-r--r--irstlm/src/ngramcache.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/irstlm/src/ngramcache.cpp b/irstlm/src/ngramcache.cpp
index ea8e309c2..3b9ea1e2f 100644
--- a/irstlm/src/ngramcache.cpp
+++ b/irstlm/src/ngramcache.cpp
@@ -34,8 +34,8 @@ ngramcache::ngramcache(int n,int size,int maxentries){
infosize=size;
maxn=maxentries;
entries=0;
- ht=new htable(maxn * 2, ngsize * sizeof(int),INT,NULL); //load factor 2
- mp=new mempool(ngsize * sizeof(int)+infosize,maxn/10);
+ ht=new htable(maxn * 5, 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,8 +50,8 @@ ngramcache::~ngramcache(){
void ngramcache::reset(){
ht->stat();
delete ht;delete mp;
- ht=new htable(maxn * 2, ngsize * sizeof(int),INT,NULL); //load factor 2
- mp=new mempool(ngsize * sizeof(int)+infosize,maxn/10);
+ ht=new htable(maxn * 5, ngsize * sizeof(int),INT,NULL); //load factor 2
+ mp=new mempool(ngsize * sizeof(int)+infosize,maxn/5);
entries=0;
}