Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- +typedef uint8_t v32 __attribute__ ((__vector_size__ (32)));
- +void * cpy128(void * to, void * from) {
- + v32 * vto = to, * vfrom = from;
- + *vto++ = *vfrom++;
- + *vto++ = *vfrom++;
- + *vto++ = *vfrom++;
- + *vto++ = *vfrom++;
- + return to;
- +}
- +
- static void
- runtest(struct part *p, struct test *t)
- {
- @@ -232,9 +230,13 @@ runtest(struct part *p, struct test *t)
- for (k = 0; k < passes; k++) {
- fprintf(stderr, ".");
- + uint64_t i = rounds, len = strlen(t->string) + 1;
- + char buff[len + 4096];
- + char string[len + 4096]; memcpy(string, t->string, len);
- gettimeofday(&begin, NULL);
- - for (i = 0; i < rounds; i++)
- - go(p, t->string, t->needle);
- + do {
- + p->f(cpy128(buff, string), t->needle);
- + } while(--i);
- gettimeofday(&end, NULL);
- time = (end.tv_sec - begin.tv_sec) * 1000.0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement