[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
malloc is slow
From: |
dan |
Subject: |
malloc is slow |
Date: |
Wed, 16 Oct 2002 23:41:32 +0200 |
User-agent: |
Mutt/1.4i |
Hi,
I'm writing a scheme interpreter, developping on Debian/GNUlinux. I
found that the malloc and friends function are slow on my system.
My system is a debian unstable, glibc-2.2.5.
I tried to link my interpreter with DL malloc version 2.7.2 too. I
wrote several benches both running with the glibc malloc and the
dlmalloc. This is the time I obtained with one, the time got with the
other are pretty representative. In this bench, ~ 1.5sec is spend
doing a loop and some other junk, the rest is pure play with
allocation.
REAL USER SYSTEM
--------------------------------------------------------
GLIBC-2.2.5 0m25.927s 0m25.860s 0m0.050s
DLMALLOC-2.7.2 0m6.360s 0m6.240s 0m0.060s
>From this, I deduce that the malloc from glibc is at least 4 times
less efficient than the dl malloc. Is this something expected or do I
something wrong ?
I can give you more details in case you are interested.
Best regards.
--
Courage, fuyons...