PuTTY semi-bug optimise-bignum

Home | Licence | FAQ | Docs | Download | Keys | Links
Mirrors | Updates | Feedback | Changes | Wishlist | Team

summary: Enable bignum optimisation for Windows Visual C builds
class: semi-bug: This might or might not be a bug, depending on your precise definition of what a bug is.
difficulty: tricky: Needs many tuits.
priority: medium: This should be fixed one day.
fixed-in: r6469 2005-11-24 (0.59) (0.60) (0.61) (0.62)

sshbn.c contains conditionally-activated optimised code for x86 processors which uses 32-bit chunks instead of 16-bit ones, and a small amount of inline assembler to force fast arithmetic with these chunks. This makes a noticeable difference to bignum operations such as at SSH connection setup.

We only have appropriate compiler goop for GCC/x86 currently, so this code will only be activated on many Linux/Unix x86 builds and MinGW/Cygwin Windows builds; in particular, it's not in our standard Windows builds, which are done with MS Visual C.

It would be nice if we could enable the C bit of the optimisation on more processors. In particular, it might be handy on the Mac port, if any of the slower Mac processors can get anything out of it.

Update, 2005-11-23: part of a patch from Lionel Fourquaux that enables this optimisation has now been applied. Since this fixes the overwhelmingly common case, I'm going to declare this fixed, although patches for other compilers/platforms are still welcome.

Here's an example comparing r6460 with r6469 (built with the same compiler), on a slow (P233) client connecting to a fast (Athlon 1800) server:
DH group exchange 4096-bit RSA2 user auth
Vanilla VC 12s/11s/11s 124s/124s/123s
Optimised VC 3s/3s/3s 31s/30s/31s

Audit trail for this semi-bug.


If you want to comment on this web site, see the Feedback page.
(last revision of this bug record was at 2005-11-25 23:27:40 +0000)