bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gc-pbkdf2-sha1


From: Simon Josefsson
Subject: Re: gc-pbkdf2-sha1
Date: Wed, 12 Oct 2005 15:55:37 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

Hi Ralf!  Thanks for your comments..

Ralf Wildenhues <address@hidden> writes:

> By the way, has anyone suggested to use one of these documentation-
> from-source-comments generators for gnulib yet?  Has it been rejected?

I don't think anyone has proposed it.  I'm somewhat biased towards
GTK-DOC style comments together with <http://josefsson.org/gdoc/>
since I have been using that combination in most of my projects for
quite some time.  It can generate API documentation in many formats,
including HTML, Texinfo and man.  Producing doxygen documentation is
possible through a filter (although not very reliable).  I think it
would be cool if gnulib would use GTK-DOC comments and have complete
HTML/Texinfo/etc API manuals online.

I would be willing to set up a GTK-DOC environment for gnulib if
people like this approach.

There is also doxygen which is quite popular.  But no texinfo support
AFAIK.

What do people think?

>> +          size_t tmplen = Slen + 4;
>> +
>> +          tmp = malloc (tmplen);
>
> Allocating (even the same amount of!) memory inside a loop
> is a performance killer, as is freeing it.  Please do that
> as far outside as possible, even then it might dominate the
> rest of the function.  Can't you even have that be done by
> the caller through some init routine that encapsulates this?

I have moved the malloc/free outside of the loop.

Ideally, there isn't a need to do a copy at all, if we can use a
gc_hash_init/gc_hash_update/gc_hash_finish approach instead of
gc_hmac_sha1.  However, that functionality hasn't been installed yet,
so I prefer to wait until it is.

Thanks,
Simon




reply via email to

[Prev in Thread] Current Thread [Next in Thread]