Quoting Samuel Thibault (2014-12-19 02:54:17) > Justus Winter, le Fri 19 Dec 2014 02:48:56 +0100, a écrit : > > Use the ternary operator to implement `assert' like it is done in the > > glibc. The glibcs changelog does not mention the rationale behind > > this change, but it does improve our IPC performance. > > Mmm, is it not a matter of changing the estimation of probability of > branching from the compiler? I guess using an "unlikely" macro would > get the same benefit in a much more readable and compiler-portable way?
Yes, I tried that first, without getting any improvements. The libc once used __builtin_expect for assert too, but stopped (they didn't mention why in the changelog). Lacking a specialized IPC microbenchmark I'm using iperf to measure TCP performance (over netdde), which is greatly influenced by IPC performance. I'll work a little on my IPC microbenchmark, and try to reproduce my findings with it. Justus