> On Dec. 7, 2012, 9:19 a.m., Cliff Jansen wrote: > > This looks good from a portability perspective. But it must present a > > performance penalty on big endian hardware, though I can't quantify the > > amount. Are these functions not available on some platform? > > Andrew Stitcher wrote: > I'd actually be surprised if there was much/any performance problem here > since the new functions are inlined and the compiler should be able to do > just as good a job. Asa data point this is what we do in qpid and there is no > slowdown there. > > Another point: the previous code can perform unaligned memory access, > which can be a problem on some platforms, whereas this code avoids this issue.
I've done some simple benchmarking with an a modified version of the send/recv examples (modified to send/receive multiple messages). Testing this change against an equivalent trunk version shows a small speed up of between 1-5% in nearly every case, the worst I saw in this test was a 0.04% slow down. I have no explanation for any speed up due to this code, but I think this test shows the change is small enough to not be noticeable under usual circumstances. - Andrew ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/8385/#review14146 ----------------------------------------------------------- On Dec. 6, 2012, 11:10 p.m., Andrew Stitcher wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/8385/ > ----------------------------------------------------------- > > (Updated Dec. 6, 2012, 11:10 p.m.) > > > Review request for qpid, Cliff Jansen and Rafael Schloming. > > > Description > ------- > > Removed the use of [nh]to[hn][ls] in the ANSI only part of the code as they > are part of BSD sockets API not in ANSI C. > > There is now some duplication of code which should be removed, but nothing > serious in my opinion. > > > This addresses bug PROTON-121. > https://issues.apache.org/jira/browse/PROTON-121 > > > Diffs > ----- > > /proton/trunk/proton-c/src/codec/codec.c 1417656 > /proton/trunk/proton-c/src/framing/framing.c 1417656 > > Diff: https://reviews.apache.org/r/8385/diff/ > > > Testing > ------- > > Compiled under Fedora and run proton-test against the built code. > > > Thanks, > > Andrew Stitcher > >