The changes look good. For the
SPARC version, the '& 0xff000000' part for the
32-bit version and the '& 0xff00000000000000ULL'
for the 64-bit version and the '& 0xff' for both
versions can be omitted (though I think at -xO3
or greater level of optimization the compiler will
not emit any instruction for those anyways).

Just out of curiosity, what type of processor was
used for the SPARC results on your spreadsheet?

Thanks,
           Ferenc

On 08/22/08 00:56, Dan Anderson wrote:
> Here's a review to optimize several byte swapping macros in sys/byteorder.h
> http://dan.drydog.com/reviews/6729208-bswap3/
> 
> I optimized the macros by calling the htons()/htonl()/htonll() builtin 
> function, or with a simple unaligned assignment (x86), or (for BSWAP* on 
> Sparc) writing a faster C macro.
> 
> Here's a pretty spreadsheet chart that shows the optimization (from calling 
> the macros in a loop)
> http://dan.drydog.com/reviews/6729208-bswap3-opt-chart.png
> On the chart, OLD = current source, NEW=this webrev.
> I measured on AMD64, EM64T, and sun4u boxen; times in milliseconds.
> 
> Please comment by COB Wed. Sept. 3.
> 
> --
> This message posted from opensolaris.org
> _______________________________________________
> crypto-discuss mailing list
> crypto-discuss at opensolaris.org
> http://mail.opensolaris.org/mailman/listinfo/crypto-discuss

Reply via email to