3) access to thread-local errno is slow, it's also better to cache it.
Pheww! That is micro-optimization indeed.
Well, thread-local errno might involve a function call on some systems.
If the function call is not CSE'd by the compiler, it means half a
dozen function calls.
Do you have an objection against this further patch? Should save 2 instructions
in the case that you were not profiling.
*That* is micro-optimization! :-) It actually makes the code clearer,
so go on. But I guess a division is more expensive than those 2
instructions...
(I used Shark to get the profile. rpl_poll was responsible for 6%
before my optimizations and 3% afterwards. So not a big change from
Amdahl's point of view :-) but a big change for this specific function).
Paolo