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: Thu, 27 Jan 2022 10:27:10 +0100 (CET)
On Thu, 27 Jan 2022, Gavin Henry wrote:
> I remember in the OpenLDAP project when they removed/reduced the amount of
> times sizeofs that were used for performance gains.
When is sizeof ever a slow operation?
As we're only using C89, our sizeof uses are only ever for types/structs, and
I can't see how those are not just converted to a constant at compile-time by
the compiler.
Date: Thu, 27 Jan 2022 10:27:10 +0100 (CET)
On Thu, 27 Jan 2022, Gavin Henry wrote:
> I remember in the OpenLDAP project when they removed/reduced the amount of
> times sizeofs that were used for performance gains.
When is sizeof ever a slow operation?
As we're only using C89, our sizeof uses are only ever for types/structs, and
I can't see how those are not just converted to a constant at compile-time by
the compiler.
-- / 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-01-27