mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 10:07:15 +02: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:
Notes:
sideshowbarker
2024-07-18 18:13:31 +09:00
Author: https://github.com/Dexesttp Commit: https://github.com/SerenityOS/serenity/commit/fd80e7a339c Pull-request: https://github.com/SerenityOS/serenity/pull/7067 Reviewed-by: https://github.com/alimpfard
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user