PuTTY semi-bug optimise-bignum

This is a mirror. Follow this link to find the primary PuTTY web site.

Home | FAQ | Feedback | Licence | Updates | Mirrors | Keys | Links | Team
Download: Stable · Snapshot | Docs | Privacy | Changes | Wishlist

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 d72e4b718ca43152ffdede945a1ffbc5a851e2b0 2005-11-24 (0.59)

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


If you want to comment on this web site, see the Feedback page.
Audit trail for this semi-bug.
(last revision of this bug record was at 2016-12-27 11:40:21 +0000)