diff options
author | Neal H. Walfield <neal@pep.foundation> | 2023-01-06 12:26:42 +0100 |
---|---|---|
committer | Neal H. Walfield <neal@pep.foundation> | 2023-01-06 12:41:42 +0100 |
commit | c226438e97efcf4cd235a8eb31d3f142d4b2fd06 (patch) | |
tree | 1dfca93dbe55612fbf68275f6bcb4506ae07f7cf /openpgp/src/armor.rs | |
parent | 3e188fb312ad4db1395f5e836bffaf2034b88a42 (diff) |
buffered-reader, openpgp: Change the default buffer size.
- Change the default buffer size from 8 KB to 32 KB.
- Benchmarking using the chameleon reading a 23 MB cert-d with about
800 certificates, and verifying a signature over a short (2 KB)
message, showed that 32 KB is optimal. In particular, 16 KB and
64 KB buffer sizes were, respectively, 10% and 30% worse.
Diffstat (limited to 'openpgp/src/armor.rs')
-rw-r--r-- | openpgp/src/armor.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/openpgp/src/armor.rs b/openpgp/src/armor.rs index 08a16f46..6a3bb381 100644 --- a/openpgp/src/armor.rs +++ b/openpgp/src/armor.rs @@ -581,7 +581,7 @@ pub struct Reader<'a> { assert_send_and_sync!(Reader<'_>); // The default buffer size. -const DEFAULT_BUF_SIZE: usize = 8 * 1024; +const DEFAULT_BUF_SIZE: usize = 32 * 1024; impl<'a> fmt::Display for Reader<'a> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { |