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@hunch.net>2009-12-01 00:06:04 +0300
committerJohn Langford <jl@hunch.net>2009-12-01 00:06:04 +0300
commit1a8173b1f1d74c2571df01110901bc92e8f65527 (patch)
treef8777a6bcc10b5143e15ac7b7604b1e54e6e6994 /cache.cc
parent64ed3f49e4e2ecc152ddcbfdb8a015e8e4b86278 (diff)
fixed performance bug due to unnecessary sorting
Diffstat (limited to 'cache.cc')
-rw-r--r--cache.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/cache.cc b/cache.cc
index 8c947557..4e898c1c 100644
--- a/cache.cc
+++ b/cache.cc
@@ -5,6 +5,7 @@ embodied in the content of this file are licensed under the BSD
*/
#include "cache.h"
+#include "unique_sort.h"
size_t neg_1 = 1;
size_t general = 2;
@@ -87,6 +88,14 @@ int read_cached_features(parser* p, void* ec)
return total;
}
+int read_and_order_cached_features(parser* p, void* ec)
+{
+ int ret = read_cached_features(p,ec);
+ unique_sort_features(p,(example*)ec);
+ return ret;
+}
+
+
char* run_len_encode(char *p, size_t i)
{// store an int 7 bits at a time.
while (i >= 128)