From 2133ba64bfb3a3383d4b68d4e3efa30959363472 Mon Sep 17 00:00:00 2001 From: Valentin Balaschenko <13349202+vlntb@users.noreply.github.com> Date: Wed, 8 Jul 2026 15:57:53 +0100 Subject: [PATCH] 3.5.6_3.6.2 --- conan.lock | 44 +++++++++---------- conanfile.py | 2 +- run_openssl_comparison.sh | 34 ++++++++++++++ run_singlehash.sh | 2 + .../basics/openssl_test_results_3.5.6_3.6.2 | 35 +++++++++++++++ 5 files changed, 94 insertions(+), 23 deletions(-) create mode 100755 run_openssl_comparison.sh create mode 100755 run_singlehash.sh create mode 100644 src/tests/libxrpl/basics/openssl_test_results_3.5.6_3.6.2 diff --git a/conan.lock b/conan.lock index 6633d9f5ec..e032059b89 100644 --- a/conan.lock +++ b/conan.lock @@ -1,44 +1,44 @@ { "version": "0.5", "requires": [ - "zlib/1.3.2#1cb806da49011867778ffb6ac7190fcb%1782392402.122708", - "xxhash/0.8.3#681d36a0a6111fc56e5e45ea182c19cc%1782392402.420688", - "sqlite3/3.53.0#324ada52333108388a9a6108bfa96734%1782392403.185447", - "soci/4.0.3#e726491a03468795453f7c83fc924a96%1782392402.679521", - "snappy/1.1.10#968fef506ff261592ec30c574d4a7809%1782307151.633168", + "zlib/1.3.2#1cb806da49011867778ffb6ac7190fcb%1778091116.056", + "xxhash/0.8.3#681d36a0a6111fc56e5e45ea182c19cc%1743678659.187", + "sqlite3/3.53.0#324ada52333108388a9a6108bfa96734%1778091117.311", + "soci/4.0.3#e726491a03468795453f7c83fc924a96%1751554127.172", + "snappy/1.1.10#968fef506ff261592ec30c574d4a7809%1756234314.246", "secp256k1/0.7.1#b1f450b7f78a36fff75bb6934a356f3a%1782338841.3729", - "rocksdb/10.5.1#4a197eca381a3e5ae8adf8cffa5aacd0%1782392413.075713", - "re2/20251105#8579cfd0bda4daf0683f9e3898f964b4%1782392402.431897", + "rocksdb/10.5.1#4a197eca381a3e5ae8adf8cffa5aacd0%1762797952.535", + "re2/20251105#8579cfd0bda4daf0683f9e3898f964b4%1774398111.888", "protobuf/6.33.5#ff253ead763bd8d9904a52979cd21e81%1782392410.233933", - "openssl/3.5.6#13f8f30151479797ca8a7c014856f849%1775635548.661", - "nudb/2.0.9#11149c73f8f2baff9a0198fe25971fc7%1782392402.297166", + "openssl/3.6.2#4789bbf131b77d0515d15e094c8f697f%1778071755.506", + "nudb/2.0.9#11149c73f8f2baff9a0198fe25971fc7%1775040983.408", "mpt-crypto/0.4.0-rc2#a580f2f9ad0e795de696aa62d54fb9af%1782425834.488828", "lz4/1.10.0#982d9b673900f665a1da109e09c17cab%1782392402.164188", "libiconv/1.17#9923bc6dc6f106646d6967e0039a5ada%1782392792.775744", - "libbacktrace/cci.20210118#a7691bfccd8caaf66309df196790a5a1%1782392402.420732", - "libarchive/3.8.7#c446109bd1f1d8ba7936c94189bc50e6%1782392403.066892", + "libbacktrace/cci.20210118#a7691bfccd8caaf66309df196790a5a1%1722218217.276", + "libarchive/3.8.7#c446109bd1f1d8ba7936c94189bc50e6%1778091117.848", "jemalloc/5.3.1#1fc58d55316041f10fbc1e8a2eae632a%1776700028.228", - "gtest/1.17.0#5224b3b3ff3b4ce1133cbdd27d53ee7d%1782392402.791979", + "gtest/1.17.0#5224b3b3ff3b4ce1133cbdd27d53ee7d%1768312129.152", "grpc/1.81.1#5217e6ef0544c42b46f4af35d5e7f649%1782307148.845616", - "ed25519/2015.03#ae761bdc52730a843f0809bdf6c1b1f6%1782307148.15562", - "date/3.0.4#862e11e80030356b53c2c38599ceb32b%1782392402.538492", - "c-ares/1.34.6#545240bb1c40e2cacd4362d6b8967650%1782392402.681654", - "bzip2/1.0.8#c470882369c2d95c5c77e970c0c7e321%1782392402.296732", - "boost/1.91.0#ea540ca2133d831b560036aa24dece3c%1782392419.475605", - "abseil/20250127.0#bb0baf1f362bc4a725a24eddd419b8f7%1782307147.395833" + "ed25519/2015.03#ae761bdc52730a843f0809bdf6c1b1f6%1765850143.772", + "date/3.0.4#862e11e80030356b53c2c38599ceb32b%1765850143.772", + "c-ares/1.34.6#545240bb1c40e2cacd4362d6b8967650%1774439234.681", + "bzip2/1.0.8#c470882369c2d95c5c77e970c0c7e321%1765850143.837", + "boost/1.91.0#ea540ca2133d831b560036aa24dece3c%1778091165.282", + "abseil/20250127.0#bb0baf1f362bc4a725a24eddd419b8f7%1774365460.196" ], "build_requires": [ - "zlib/1.3.2#1cb806da49011867778ffb6ac7190fcb%1782392402.122708", + "zlib/1.3.2#1cb806da49011867778ffb6ac7190fcb%1778091116.056", "strawberryperl/5.32.1.1#8d114504d172cfea8ea1662d09b6333e%1782395692.540639", "protobuf/6.33.5#ff253ead763bd8d9904a52979cd21e81%1782392410.233933", "nasm/2.16.01#31e26f2ee3c4346ecd347911bd126904%1782395690.33162", "msys2/cci.latest#d22fe7b2808f5fd34d0a7923ace9c54f%1770657326.649", "m4/1.4.19#34c4bbc3eeebe98ca6edf2f52d602e7d%1777282960.259", "cmake/4.3.3#840cf00ea09777e05c2050a50a82c722%1782392418.696091", - "b2/5.4.2#ffd6084a119587e70f11cd45d1a386e2%1782392402.624226", + "b2/5.4.2#ffd6084a119587e70f11cd45d1a386e2%1774439233.447", "automake/1.16.5#b91b7c384c3deaa9d535be02da14d04f%1755524470.56", "autoconf/2.71#51077f068e61700d65bb05541ea1e4b0%1731054366.86", - "abseil/20250127.0#bb0baf1f362bc4a725a24eddd419b8f7%1782307147.395833" + "abseil/20250127.0#bb0baf1f362bc4a725a24eddd419b8f7%1774365460.196" ], "python_requires": [], "overrides": { @@ -62,4 +62,4 @@ ] }, "config_requires": [] -} +} \ No newline at end of file diff --git a/conanfile.py b/conanfile.py index 0b025c096d..a2997c408b 100644 --- a/conanfile.py +++ b/conanfile.py @@ -33,7 +33,7 @@ class Xrpl(ConanFile): "grpc/1.81.1", "libarchive/3.8.7", "nudb/2.0.9", - "openssl/3.5.6", + "openssl/3.6.2", "soci/4.0.3", "zlib/1.3.2", ] diff --git a/run_openssl_comparison.sh b/run_openssl_comparison.sh new file mode 100755 index 0000000000..686159db6b --- /dev/null +++ b/run_openssl_comparison.sh @@ -0,0 +1,34 @@ +#!/usr/bin/env bash +# Compare SHA-512-half performance: OpenSSL 3.5.6 vs 3.6.2. +# Binaries are identical builds (GCC 13.3, Release, same locked deps), +# differing only in the statically linked OpenSSL. +set -euo pipefail + +cd "$(dirname "$0")/.build" + +OLD=./xrpl_tests-openssl-3.5.6 +NEW=./xrpl_tests-openssl-3.6.2 + +# Single hash of the full 100 KB buffer. Startup-dominated (~ms), kept for +# parity with earlier result logs; expect near-identical numbers. +FILTER=OpenSSL.SingleHashFullSlice +hyperfine -N \ + --warmup 5 \ + --min-runs 200 \ + --command-name "openssl-3.5.6 singlehash" "$OLD --gtest_filter=$FILTER" \ + --command-name "openssl-3.6.2 singlehash" "$NEW --gtest_filter=$FILTER" \ + --export-markdown openssl_comparison_singlehash.md \ + --export-json openssl_comparison_singlehash.json + +# 100k hashes per run; the meaningful benchmark. +FILTER=OpenSSL.MultihashAllSlices +hyperfine \ + --warmup 5 \ + --min-runs 20 \ + --command-name "openssl-3.5.6 multihash" "$OLD --gtest_filter=$FILTER" \ + --command-name "openssl-3.6.2 multihash" "$NEW --gtest_filter=$FILTER" \ + --export-markdown openssl_comparison.md \ + --export-json openssl_comparison.json + +echo +echo "Results saved to .build/openssl_comparison*.md and .build/openssl_comparison*.json" diff --git a/run_singlehash.sh b/run_singlehash.sh new file mode 100755 index 0000000000..6883a64fc6 --- /dev/null +++ b/run_singlehash.sh @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +./.build/xrpl_tests --gtest_filter=OpenSSL.SingleHashFullSlice diff --git a/src/tests/libxrpl/basics/openssl_test_results_3.5.6_3.6.2 b/src/tests/libxrpl/basics/openssl_test_results_3.5.6_3.6.2 new file mode 100644 index 0000000000..6e8efbd1d0 --- /dev/null +++ b/src/tests/libxrpl/basics/openssl_test_results_3.5.6_3.6.2 @@ -0,0 +1,35 @@ +------------------------------------------------------------------------------------------------- +OpenSSL 3.5.6 vs 3.6.2 comparison +Date: 2026-07-08 +Branch: vlntb/pratik-openssl-performance-test (commit 9b7582be93) +Machine: valentin-Thelio-Major (Ubuntu 24.04, 48 cores) + +Both binaries are identical Release builds (GCC 13.3, C++23, same conan.lock), +differing only in the statically linked OpenSSL version (verified via the +embedded version banner: grep -aom1 'OpenSSL 3\.' ). +Tests were ported from doctest to GTest, so the runner differs from the +openssl_test_results_1 runs: single combined binary xrpl_tests, --gtest_filter +instead of --test-case. Old absolute numbers are not directly comparable +(different compiler: GCC 12 vs GCC 13). + +Benchmark script: run_openssl_comparison.sh (hyperfine 1.18.0) + +SingleHashFullSlice (hyperfine -N --warmup 5 --min-runs 200) +Note: startup-dominated (~ms); one 100 KB hash takes microseconds. + +| Command | Mean [ms] | Min [ms] | Max [ms] | Relative | +|:---------------------------|----------:|---------:|---------:|------------:| +| openssl-3.5.6 singlehash | 4.6 ± 0.5 | 3.9 | 7.4 | 1.02 ± 0.14 | +| openssl-3.6.2 singlehash | 4.5 ± 0.5 | 3.9 | 6.5 | 1.00 | + +MultihashAllSlices (hyperfine --warmup 5 --min-runs 20; 100k sha512Half calls per run) + +| Command | Mean [s] | Min [s] | Max [s] | Relative | +|:---------------------------|--------------:|--------:|--------:|------------:| +| openssl-3.5.6 multihash | 4.084 ± 0.021 | 4.056 | 4.123 | 1.01 ± 0.01 | +| openssl-3.6.2 multihash | 4.060 ± 0.011 | 4.046 | 4.086 | 1.00 | + +Conclusion: 3.6.2 is on par with 3.5.6 on both benchmarks (differences within +noise). The ~42% SHA-512 regression observed with the 3.6.0 alpha (see +openssl_test_results_1: 5.636 s vs 3.968 s for 3.5.4) is fixed in the 3.6.2 +release. No performance objection to upgrading.