Closed ghost closed 4 years ago
Thanks. Will merge, although I will modify it somewhat: Hard-coding SSE2 usage into the binary is not nice since the binary then breaks if used on a non-SSE2 machine. I will add a corresponding configure flag (and a USE-flag in the ebuild).
Thanks. Will merge, although I will modify it somewhat: Hard-coding SSE2 usage into the binary is not nice since the binary then breaks if used on a non-SSE2 machine. I will add a corresponding configure flag (and a USE-flag in the ebuild).
Just a note: SSE2 is mandated by the x86-64 ISA, so a non-SSE2 machine basically means a 32-bit machine with a CPU released before year 2003.
Thanks for the information. Anyway, that's what the USE=cpu_flags_x86_sse2 (CPU_FLAGS_X86="sse2") is for in gentoo. If not specified, defaulting to __SSE2__
is fine, but users should be able to override.
Use SSE2 instructions to improve performance of find_first_of() by about 40%, which in turn improves performance of eix-update by about 20%. In case the CPU/compiler does not support SSE2, this patch isn't causing a performance drop. If/when the performance of std::string::find_first_of() improves, the custom find_first_of() function can be removed. Tested with GCC 10.2.0 and clang 10.0.1.
Also add missing std::move to slightly improve performance.
Please merge. Thanks.