[Midnightbsd-cvs] src: rc4.c: avoid 256 integer divisions per rc4_init call.

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Thu Mar 15 08:06:21 EDT 2012


Log Message:
-----------
avoid 256 integer divisions per rc4_init call.  Replace it with using an index variable.

Speeds up almost by 2x and helps with VPN software performance.

Obtained from: FreeBSD

Modified Files:
--------------
    src/sys/crypto/rc4:
        rc4.c (r1.1.1.1 -> r1.2)
        (http://cvsweb.midnightbsd.org/src/sys/crypto/rc4/rc4.c?r1=1.1.1.1&r2=1.2)


More information about the Midnightbsd-cvs mailing list