#include <stdio.h>
#include <stdlib.h>
-#define NB_ELM 20000
+#define NB_ELM 200000
#define SIZEOFKEY 1024
static void print_str(void *str);
printf(" (a point is a test)\n");
for (i=0;i<20;i++) {
- TRYFAIL(gras_dict_new(&head));
+ head=gras_dict_new();
if (i%10) printf("."); else printf("%d",i/10); fflush(stdout);
nb=0;
for (j=0;j<1000;j++) {
key[k]=rand() % ('z' - 'a') + 'a';
key[k]='\0';
/* printf("[%d %s]\n",j,key); */
- TRYFAIL(gras_dict_set(head,key,key,&free));
+ gras_dict_set(head,key,key,&free);
}
nb=0;
/* gras_dict_dump(head,(void (*)(void*))&printf); */
}
- TRYFAIL(gras_dict_new(&head));
+ head=gras_dict_new();
printf("\n Fill 20 000 elements, with keys being the number of element\n");
printf(" (a point is 1 000 elements)\n");
for (j=0;j<NB_ELM;j++) {
}
sprintf(key,"%d",j);
- TRYFAIL(gras_dict_set(head,key,key,&free));
+ gras_dict_set(head,key,key,&free);
}
printf("\n Count the elements (retrieving the key and data for each): \n");