Peer review of AMD64/FreeBSD article

James R. Van Artsalen james at jrv.org
Fri Mar 12 11:05:43 PST 2004


Peter Wemm wrote:

>The OpenSSL stuff in the FreeBSD source tree has hand-optimized i386 
>assembler code in it.  The amd64 configuration of the integrated 
>OpenSSL uses the generic C code.  Given this, I wouldn't expect them to 
>be even close.
>
>  
>
Is this worth fixing?  I could do this: there's no rocket science 
involved in porting the existing x86 code.

The main drawback is maintainability: nobody wants Yet Another Cryptic 
.S file to maintain.  But if the Powers That Be are willing to take an 
assembly file for these things and it's  believed likely to be 
worthwhile I can take a look.  To be honest I'm not sure I'd want to add 
to the maintainability problem here.

The kernel IPsec crypto routines might be a better win, except that 
nobody has complained about it yet.  No way is a .S worth it without 
complaints.

PS. The IP checksum routine is another one that could be improved.  It's 
doing 32 bits at a time right now, with no PREFETCH opcodes.


More information about the freebsd-amd64 mailing list