On 30. 12. 25 10:25, Branko Čibej wrote:
On 30. 12. 25 08:58, Daniel Sahlberg wrote:
Den mån 29 dec. 2025 kl 18:55 skrev Branko Čibej <[email protected]>:
Instead, why not report the results of your measurements to APR
and then, maybe, who knows, help to improve the performance of
APR's implementation? At the very least, every single
installation of Apache HTTPd that uses the improved APR will
become that tiny bit faster. Multiply by millions of installs and
it becomes clear that the impact would be far more positive than
just tweaking this in Subversion.
I think this is a very valid suggestion. The APR md5 implementation
is within the crypto module which, if I'm reading CMakeList.txt
correctly require OpenSSL. So the plumbing to use OpenSSL versions
should already be there.
Note that while implemented in apr-util/crypto, the hash algorithms
(md4, md5, sha1) do *not* depend on OpenSSL or any other crypto
provider. You can configure apr-util --without-crypto and these
functions will still be available. Making them dependent on a crypto
provider would be considered a breaking change.
Making them faster would likely involve using features of modern CPUs.
OpenSSL has implementations in assembly for the most common platforms.
There's an interesting quirk here: OpenSSL is now licensed under the
Apache License, so APR could just "steal" those hash implementations.
But that's a discussion for another list.
The reason I pointed this out is that having a repeatable, public
benchmark that such as Tima just showed us could be a good argument for
doing something like that.
-- Brane