diff options
author | John Langford <jl@humpty.(none)> | 2010-09-24 23:58:29 +0400 |
---|---|---|
committer | John Langford <jl@humpty.(none)> | 2010-09-24 23:58:29 +0400 |
commit | 7e7cc9dd14650570002179c816a4af9eeb907fd6 (patch) | |
tree | 431b97171d2b22dda7a7abcdffa40ac07b812222 /parser.cc | |
parent | db4fc53a3271ac88d29e88c204367703c22c072c (diff) |
optimizations for speed
Diffstat (limited to 'parser.cc')
-rw-r--r-- | parser.cc | 8 |
1 files changed, 1 insertions, 7 deletions
@@ -532,13 +532,7 @@ void setup_example(parser* p, example* ae) current += expert_size; } ae->num_features += ae->atomics[*i].end - ae->atomics[*i].begin; - } - for (size_t* i = ae->indices.begin; i != ae->indices.end; i++) - { - for(feature* j = ae->atomics[*i].begin; j != ae->atomics[*i].end; j++){ - ae->sum_feat_sq[*i] += j->x*j->x; - } - ae->total_sum_feat_sq += ae->sum_feat_sq[*i]; + ae->total_sum_feat_sq += ae->sum_feat_sq[*i]; } for (vector<string>::iterator i = global.pairs.begin(); i != global.pairs.end();i++) { |