Thread (45 messages) 45 messages, 6 authors, 2007-10-08

{twofish,aes}-{x86_64,i586} versus C implementations

From: Andi Kleen <hidden>
Date: 2007-08-20 00:34:33

Hallo,

Currently there are two twofish and two aes implementions on x86.
Worse when both are enabled as modules a modprobe aes
will get the C version which seems to be slower on K8 
and about the same speed on Core2 on my tests.
 
Is there a specific reason why anybody would prefer the C functions
over the assembler functions? 

Possible reasons I could think of:
- If the assembler functions are optimized for a specific CPU the compiler
might be able to do a better job on other CPUs.
Is there evidence for this? I suspect it's not true.

- They are not trusted and might be buggy. I assume they have
been validated against the C versions with a wide range of input
data, correct? 

If none of these reasons are valid it might make sense to disable
the C versions for x86 and only offer the assembler versions.
Then modprobe aes|twofish would DTRT automatically.

Comments?

-Andi
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help