Citeren Alexandru Ardelean :
On Tue, Nov 7, 2017 at 11:18 PM, Arjen de Korte
wrote:
Citeren Rosen Penev :
I beg to differ. https://vorpus.org/blog/why-does-calloc-exist/
Section 2.
I don't care about theoretical gains, benchmarks please. How much do you
gain with these patches? I really
On Tue, Nov 7, 2017 at 9:34 PM, Rosen Penev wrote:
> Replace malloc+memset with calloc. Cleaner and faster in extreme situations.
>
> Signed-off-by: Rosen Penev
> ---
> libubus.c | 6 ++
> lua/ubus.c | 18 ++
> 2 files changed, 8 insertions(+), 16 deletions(-)
>
> diff --gi
On Tue, Nov 7, 2017 at 11:18 PM, Arjen de Korte wrote:
> Citeren Rosen Penev :
>
>> I beg to differ. https://vorpus.org/blog/why-does-calloc-exist/
>>
>> Section 2.
>
>
> I don't care about theoretical gains, benchmarks please. How much do you
> gain with these patches? I really doubt that in any
Citeren Rosen Penev :
I beg to differ. https://vorpus.org/blog/why-does-calloc-exist/
Section 2.
I don't care about theoretical gains, benchmarks please. How much do
you gain with these patches? I really doubt that in any of these
patches there will be a tangible gain.
On Tue, Nov 7, 20
I beg to differ. https://vorpus.org/blog/why-does-calloc-exist/
Section 2.
On Tue, Nov 7, 2017 at 12:46 PM, Arjen de Korte wrote:
> Citeren Rosen Penev :
>
>> Replace malloc+memset with calloc. Cleaner and faster in extreme
>> situations.
>
>
> Calloc is definitly *not* faster than malloc + mems
Citeren Rosen Penev :
Replace malloc+memset with calloc. Cleaner and faster in extreme situations.
Calloc is definitly *not* faster than malloc + memset. Under the hood,
calloc will call malloc, check if memory allocation was successful and
then proceed to set all allocated memory to 0. Yo
Replace malloc+memset with calloc. Cleaner and faster in extreme situations.
Signed-off-by: Rosen Penev
---
libubus.c | 6 ++
lua/ubus.c | 18 ++
2 files changed, 8 insertions(+), 16 deletions(-)
diff --git a/libubus.c b/libubus.c
index 9463522..260e40f 100644
--- a/libubu