diff options
author | pjwilliams <pjwilliams@1f5c12ca-751b-0410-a591-d2e778427230> | 2011-02-28 14:41:08 +0300 |
---|---|---|
committer | pjwilliams <pjwilliams@1f5c12ca-751b-0410-a591-d2e778427230> | 2011-02-28 14:41:08 +0300 |
commit | 75709a6c878e7545e1b30636dec71bb9c648f8a3 (patch) | |
tree | 4b17fbdc501ef0b7a8354e45b09763dc4cc026bb /misc | |
parent | a5a860ad1fc4c77f229b307fc4b728ca77ddbf26 (diff) |
Memory efficiency: make the reserveSize argument non-optional in
Moses::Phrase's constructor. The default used to be ARRAY_SIZE_INCR = 10,
which will be excessive in many cases. Where the default was used, I've
set the exact size where that was obvious and explicitly used ARRAY_SIZE_INCR
otherwise. If you know the code involved, it's probably worth reviewing.
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@3908 1f5c12ca-751b-0410-a591-d2e778427230
Diffstat (limited to 'misc')
-rw-r--r-- | misc/queryLexicalTable.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/misc/queryLexicalTable.cpp b/misc/queryLexicalTable.cpp index 388336947..ef6e741c1 100644 --- a/misc/queryLexicalTable.cpp +++ b/misc/queryLexicalTable.cpp @@ -86,7 +86,7 @@ int main(int argc, char** argv) if(use_context) { c_mask.push_back(0); } - Phrase e(Output),f(Input),c(Output); + Phrase e(Output, 0),f(Input, 0),c(Output, 0); e.CreateFromString(e_mask, query_e, "|"); f.CreateFromString(f_mask, query_f, "|"); c.CreateFromString(c_mask, query_c,"|"); |