Re: Enormous speed difference between C and ASM implementations of crypto algorithm
- From: Phil Carmody <thefatphil_demunged@xxxxxxxxxxx>
- Date: Sat, 13 Mar 2010 21:44:10 +0200
henno <hennobrandsma@xxxxxxxxxxxxxxxxx> writes:
Tom St Denis wrote:
On Mar 7, 6:40 am, Nomen Nescio <nob...@xxxxxxxxx> wrote:
http://www.das-labor.org/wiki/AVR-Crypto-Lib/en
I was stunned to see that the ASM (assembler) implementation of AES is
more than ten times (!) as fast as the C implementation. I'd have
thought that compiler technology had narrowed the difference to maybe
10-20%. The compiler is probably GCC-AVR, which isn't as advanced as
say, the Microsoft compilers, but the difference is remarkable.
Say what? GCC on x86 *is* more advanced than MSVC by a long shot.
Most lilkely though GCC for AVR isn't 100%. Just like GCC for ARM is
not as good as ARM's own compiler.
It's not uncommon to see assembler based AES 2-3 times faster than C.
It shouldn't be 10x though...
It could be if you used the new AES instructions in x64 chipset introduced in
the i5 and i7 proecessors.
For about a week until someone patches the compiler to include
a new intrinsic and use the new instruction.
Phil
--
I find the easiest thing to do is to k/f myself and just troll away
-- David Melville on r.a.s.f1
.
- References:
- Prev by Date: Re: Using a kind of running accumulation of ciphertext as chaining value of encryption
- Next by Date: Re: Nonlinear combination of streams
- Previous by thread: Re: Enormous speed difference between C and ASM implementations of crypto algorithm
- Next by thread: Re: Enormous speed difference between C and ASM implementations of crypto algorithm
- Index(es):
Relevant Pages
|