Open wez opened 11 years ago
Regarding SSE detection, we could use more of @sbahra's work from here: http://repnop.org/cpuid.html
I think in either case, @sbahra's SSE string code / CPUID code is a good starting point for this.
Thank you for reporting this issue and appreciate your patience. We've notified the core team for an update on this issue. We're looking for a response within the next 30 days or the issue may be closed.
https://github.com/facebook/libphenom/commit/4d56a10b2c7f36a169400a85dbb76397bc1f11d5 made the situation here a bit better, but we haven't gone for the super low level aspect of this.
Throwing this one out there for folks that want to dive in.
In the bufq API we have
ph_bufq_consume_record
which searches the bufq for a matching record delimiter.For many internet protocols this delimiter is CRLF. For many other applications, we're likely to be looking for LF.
There are a couple of optimizations that could be investigated.
memmem
call using thesse3_memchr
function from here? http://repnop.org/carte/snippets/simd/. The performance.data file indicates that this performs consistently better than the darwin libc. To adopt this, we'd need to detect sse3 either at runtime or compile timesse3_memchr
that can be made for detecting CRLF?