Hello,

In a previous mail here [1], I counted strlens done by curl. This then triggered some work, mostly by Henrik Holst, to update code to not use strlen() unnecessarily when it can avoid it.

I did a quick follow-up count today. I don't recall the exact build options I used the last time, so I rebuilt 7.81.0 and current git master with the same set now and ran a comparison:

 ltrace ./src/curl -Ls https://google.com/ -o /dev/null 2>&1 | grep strlen

In 7.81.0 this made 596 to 600 strlen() calls.

In git master, this now makes 390 to 392 calls. A 33% reduction.

(This used OpenSSL/1.1.1m and google.com speaks HTTP/2 and as said before, makes a redirect)

[1] = https://curl.se/mail/lib-2022-01/0125.html

--

 / daniel.haxx.se
 | Commercial curl support up to 24x7 is available!
 | Private help, bug fixes, support, ports, new features
 | https://curl.se/support.html
--
Unsubscribe: https://lists.haxx.se/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html

Reply via email to