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

github.com/moses-smt/vowpal_wabbit.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Langford <jl@humpty.(none)>2010-09-24 23:58:29 +0400
committerJohn Langford <jl@humpty.(none)>2010-09-24 23:58:29 +0400
commit7e7cc9dd14650570002179c816a4af9eeb907fd6 (patch)
tree431b97171d2b22dda7a7abcdffa40ac07b812222 /cache.cc
parentdb4fc53a3271ac88d29e88c204367703c22c072c (diff)
optimizations for speed
Diffstat (limited to 'cache.cc')
-rw-r--r--cache.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/cache.cc b/cache.cc
index e466a7f9..8eee6233 100644
--- a/cache.cc
+++ b/cache.cc
@@ -76,6 +76,7 @@ int read_cached_features(parser* p, void* ec)
c+= sizeof(index);
push(ae->indices, (size_t)index);
v_array<feature>* ours = ae->atomics+index;
+ float* our_sum_feat_sq = ae->sum_feat_sq+index;
size_t storage = *(size_t *)c;
c += sizeof(size_t);
p->input->set(c);
@@ -101,6 +102,7 @@ int read_cached_features(parser* p, void* ec)
f.x = *(float *)c;
c += sizeof(float);
}
+ *our_sum_feat_sq += f.x*f.x;
size_t diff = f.weight_index >> 2;
int32_t s_diff = ZigZagDecode(diff);
if (s_diff < 0)