+using SXSI::TextCollectionBuilder;
+string words[] = { "Bakst",
+ "ruminants", "morphine", "AUSTRALIA",
+ "molecule" ,"brain", "human", "blood","from",
+ "with", " in", "the", "of",
+ "a",
+ "\n" };
+
+
+unsigned int NWORDS = 15;
+
+
+void time_tc(TextCollection *tc){
+ double time;
+ int count;
+ bool is;
+ TextCollection::document_result res;
+ for (unsigned int i = 0; i < NWORDS; i++){
+ std::cerr << "\"" << words[i] << "\": ";
+ STARTTIMER();
+ is = tc->IsContains((unsigned char*) words[i].c_str());
+ STOPTIMER();
+ time = GETTIME();
+
+ std::cerr << is << ", " << time << ", ";
+
+
+ STARTTIMER();
+ count = tc->Count((unsigned char*) words[i].c_str());
+ STOPTIMER();
+ time = GETTIME();
+
+ std::cerr << count << ", " << time << ", ";
+
+
+ STARTTIMER();
+ count = tc->CountContains((unsigned char*) words[i].c_str());
+ STOPTIMER();
+ time = GETTIME();
+
+ std::cerr << count << ", " << time << ", ";
+
+
+ STARTTIMER();
+ res = tc->Contains((unsigned char*) words[i].c_str());
+ STOPTIMER();
+ time = GETTIME();
+
+ std::cerr << time << ", max_mem = " << get_mem() << "\n" ;
+ };
+}