3 ms·
A more charitable reading of my comment would be that I am recommending the use of "if" instead of C++ exceptions for hot-path control flow in high-performance
by jzwinck 9y ago
A more charitable reading of my comment would be that I am recommending the use of "if" instead of C++ exceptions for hot-path control flow in high-performance libraries.
Heuristic construction of a packet filter based on previously seen exceptions is infeasible with the current API because rejection of the first N non-TCP packets does not guarantee rejection of the next one.
- to3m 9y agoThere appears to be an alternative API that doesn't throw exceptions: https://github.com/mfontanini/libtins/blob/37c92fcf5c83b034a280fd6070fb467e3d0c87bd/include/tins/pdu.h#L75 https://github.com/mfontanini/libtins/blob/37c92fcf5c83b034a... (rfind_pdu uses it internally: https://github.com/mfontanini/libtins/blob/37c92fcf5c83b034a280fd6070fb467e3d0c87bd/include/tins/pdu.h#L369 https://github.com/mfontanini/libtins/blob/37c92fcf5c83b034a...)