[pacman-dev] Crypto algorithms

Jason Chu jason at archlinux.org
Tue Apr 10 10:34:52 EDT 2007


On Tue, Apr 10, 2007 at 02:09:19PM +0300, Roman Kyrylych wrote:
> 2007/4/10, Nagy Gabor <ngaba at petra.hos.u-szeged.hu>:
> > > :S maybe i did something wrong at asmutils compile, but seems it is
> > > not faster :S its slower.
> > >
> > Yes, I also found that asmutils is slower.
> > (asmutils: OS = LINUX, KERNEL = 26, OPTIMIZE = SPEED, SYSCALL =
> > KERNEL vs. coreutils 6.9-1 standard i686 AL package)
> >
> > asmutils:
> > ---------
> > real    0m1.473s
> > user    0m0.734s
> > sys     0m0.302s
> >
> > coreutils:
> > ----------
> > real    0m1.103s
> > user    0m0.194s
> > sys     0m0.035s
> 
> This means that asmutils use slower algorithm.
> The _same_ code written in C and assembler cannot be slower in
> assembler by definition.
> One cannot made C code faster by _just_ rewriting it in assembler, but
> assembler allows better processing using internal registers, and
> easier use of MMX/SSE/etc.
> Correct use of assembler (not just "let's rewrite it in asm because
> it's faaaast!!!") does make code faster.

Some people argue that compilers can do a much better job of register
allocation and code optimization than people can.  I believe in most
non-trivial cases they're probably right.

Jason
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://archlinux.org/pipermail/pacman-dev/attachments/20070410/0c7c1d01/attachment.pgp>


More information about the pacman-dev mailing list