facebookarchive / libphenom

An eventing framework for building high performance and high scalability systems in C.
http://facebook.github.io/libphenom
Apache License 2.0
1.66k stars 362 forks source link

profile and optimize find_record #26

Open wez opened 11 years ago

wez commented 11 years ago

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.

wez commented 11 years ago

Regarding SSE detection, we could use more of @sbahra's work from here: http://repnop.org/cpuid.html

dhobsd commented 11 years ago

I think in either case, @sbahra's SSE string code / CPUID code is a good starting point for this.

ghost commented 9 years ago

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.

wez commented 9 years ago

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.