diff options
author | John Langford <jl@hunch.net> | 2009-12-01 00:06:04 +0300 |
---|---|---|
committer | John Langford <jl@hunch.net> | 2009-12-01 00:06:04 +0300 |
commit | 1a8173b1f1d74c2571df01110901bc92e8f65527 (patch) | |
tree | f8777a6bcc10b5143e15ac7b7604b1e54e6e6994 /cache.cc | |
parent | 64ed3f49e4e2ecc152ddcbfdb8a015e8e4b86278 (diff) |
fixed performance bug due to unnecessary sorting
Diffstat (limited to 'cache.cc')
-rw-r--r-- | cache.cc | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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) |