No subject

pepijn de vos pepijndevos at yahoo.com
Sat Aug 4 11:12:02 MDT 2012



Hi,

I am writing this persistent hashmap, and up to a few days it used
    its own reference counting with malloc. I'm now trying to use talloc
    instead.

In terms of code size, it was an improvement: 96 additions and 159 deletions.

In terms of speed, it was a major regression. It said in he docs
    that it would have a few percent slowdown. My test went from 15
    seconds to 5 minutes. The only thing I can think of is that I'm
    relying heavily on reference counting.

Is it just that slow, or am I using it wrong? My change:

https://github.com/pepijndevos/perper/commit/c9a05b91036bc5df1218db2b1e77dc9d180f37be

I found that you have pool allocations to speed things up. I tried
    to use them in my test, but it aborts when I use them.

https://github.com/pepijndevos/perper/blob/talloc/test.c

You can see all this for yourself by running "make && time
    ./test" using either the master or talloc branch and possibly
    uncomment my pool usage.

Regards,
Pepijn de Vos
http://pepijndevos.nl


More information about the samba-technical mailing list