Buy commercial curl support from WolfSSL. We help you work
out your issues, debug your libcurl applications, use the API, port to new
platforms, add new features and more. With a team lead by the curl founder
himself.
Re: Fewer mallocs is better, episode #47
- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]
From: Daniel Stenberg via curl-library <curl-library_at_lists.haxx.se>
Date: Sat, 5 Feb 2022 10:52:34 +0100 (CET)
On Sat, 5 Feb 2022, Henrik Holst wrote:
> The remaining 109 for google.com and hostmatch() requires a very intrusive
> patch however since it would require to add a size_t to struct hostname (aka
> add Howard Chu:s berval string) and that struct is used _alot_ (which also
> means that there can be other winnings down the line besides the certcheck
> since the hostname length is probably used a bit).
I'm not convinced that's a change we want. We need to remember that these are
"just" calls to strlen() and typically for very short strings. If we can't
measure a performance impact, we shouldn't do changes that make the code
hard to read or "unusual".
Date: Sat, 5 Feb 2022 10:52:34 +0100 (CET)
On Sat, 5 Feb 2022, Henrik Holst wrote:
> The remaining 109 for google.com and hostmatch() requires a very intrusive
> patch however since it would require to add a size_t to struct hostname (aka
> add Howard Chu:s berval string) and that struct is used _alot_ (which also
> means that there can be other winnings down the line besides the certcheck
> since the hostname length is probably used a bit).
I'm not convinced that's a change we want. We need to remember that these are
"just" calls to strlen() and typically for very short strings. If we can't
measure a performance impact, we shouldn't do changes that make the code
hard to read or "unusual".
-- / 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.htmlReceived on 2022-02-05