mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 15:57:35 +00:00
LibCrypto: Reduce the UnsignedBigInteger inline size to 32 words
We never really needed the 512 words in the first place, and this does reduce the stack allocations in montgomery modular power from 32Kb to a more manageable 2Kb :^) Note that the 32 words size doesn't provide any performance benefits or drawbacks compared to other values. All values seem to have equivalent performances (the tested values were 1, 2, 4, ..., 512). But since the previous value of 512 was definitely too big, let's reduce it for now!
This commit is contained in:
parent
ac6bd3a7a4
commit
fd80e7a339
1 changed files with 1 additions and 1 deletions
|
@ -15,7 +15,7 @@
|
|||
namespace Crypto {
|
||||
|
||||
struct UnsignedDivisionResult;
|
||||
constexpr size_t STARTING_WORD_SIZE = 512;
|
||||
constexpr size_t STARTING_WORD_SIZE = 32;
|
||||
|
||||
class UnsignedBigInteger {
|
||||
public:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue