Closed dendisuhubdy closed 7 years ago
Yes, the problem is simply that your hardware does not support AVX/AVX2. Sadly, I do not have hardware old enough to miss AVX support but to have SSE4.2 to test my code. I'll see about adding a few checks.
Ok. In my latest commit, I moved things around. It should work now. Can you try building again on your older machine?
@lemire Built succeed
suhubdyd@eos14:~/dev/despacer$ make
cc -fPIC -std=c99 -O3 -march=native -Wall -Wextra -Wshadow -o despacebenchmark ./benchmarks/despacebenchmark.c -Iinclude
suhubdyd@eos14:~/dev/despacer$ ./despacebenchmark
pointer alignment = 16 bytes
memcpy(tmpbuffer,buffer,N): 0.105469 cycles / ops
countspaces(buffer, N): 4.820312 cycles / ops
countspaces32(buffer, N): 1.062500 cycles / ops
despace(buffer, N): 4.390625 cycles / ops
despace32(buffer, N): 2.984375 cycles / ops
faster_despace(buffer, N): 2.402344 cycles / ops
faster_despace32(buffer, N): 3.312500 cycles / ops
despace64(buffer, N): 3.949219 cycles / ops
despace_to(buffer, N, tmpbuffer): 4.347656 cycles / ops
sse4_despace(buffer, N): 0.847656 cycles / ops
sse4_despace_branchless(buffer, N): 0.441406 cycles / ops
sse4_despace_branchless32(buffer, N): 0.390625 cycles / ops
sse4_despace_branchless_u2(buffer, N): 0.441406 cycles / ops
sse4_despace_branchless_u4(buffer, N): 0.417969 cycles / ops
sse4_despace_branchless_mask8(buffer, N): 0.550781 cycles / ops
sse4_despace_trail(buffer, N): 2.148438 cycles / ops
sse42_despace_branchless(buffer, N): 0.675781 cycles / ops
sse42_despace_branchless_lookup(buffer, N): 0.789062 cycles / ops
sse42_despace_to(buffer, N,tmpbuffer): 1.824219 cycles / ops
Great. Thanks for your help.