/* On veut trouver la façon la plus rapide pour remplacer une série de comparaison de chaines comme on build-protocol génére */ #include #include #include #include #include #include #include #include #include "getnow.h" using namespace std; #include "/tmp/manyifs_ref.h" template void test(const char *title, unsigned nbrep, const char *s, T t){ long long start = getnow(); unsigned count = t(s,nbrep); long long end = getnow(); showtime (title,start,end); printf ("count=%u\n",count); } int main (int argc, char *argv[]) { glocal int ret = -1; glocal const char *func = "info_write"; glocal unsigned nbrep = 1; glocal.ret = (argc,argv); setproginfo ("","0.0","..."); setarg (' ',"func","Fonction a chercher",glocal.func,false); setarg ('n',"nbrep","Nombre de répétition",glocal.nbrep,false); int ret = -1; test ("reference",glocal.nbrep,glocal.func,test_ref); test ("map",glocal.nbrep,glocal.func,test_map); test ("unordered",glocal.nbrep,glocal.func,test_unordered_map); return ret; return glocal.ret; }