This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [fortran,patch] Don't write common more than once in a module file (PR 30285)
- From: FX Coudert <fxcoudert at gmail dot com>
- To: FX Coudert <fxcoudert at gmail dot com>
- Cc: Tobias Schlüter <tobias dot schlueter at physik dot uni-muenchen dot de>, "fortran at gcc dot gnu dot org List" <fortran at gcc dot gnu dot org>, gcc-patches list <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 17 Nov 2007 01:26:43 +0000
- Subject: Re: [fortran,patch] Don't write common more than once in a module file (PR 30285)
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:in-reply-to:references:mime-version:content-type:message-id:cc:from:subject:date:to:x-mailer; bh=m01u8eGsx4VmEHfEy7cGwX8h213KsLllepthqbQyDoU=; b=oABnMcWnbCbQZWTe2AIM5yONJF6yoZzZUdkivUTccFOqhZ4mxn74UXIeoRPbeJgOuHmdRuD/EoO3KpqBtMeX93QDr+xeDJCRShcnvwI7VuMKCaOzoNLmvqu8tZS/JN0FTiQNfIv01NsrxTnnAi9ukvCsHpY2KYZycEQRunUi5Kk=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:in-reply-to:references:mime-version:content-type:message-id:cc:from:subject:date:to:x-mailer; b=L/jlknFVwXVE27T735DU33CFbCn87MPz0HiCrZ3y9+Hy92B+7uJe9n6r2fSdGrc4ZRqtgAntnSB0BkdVyn1kC8UEJiqddm1RnyTfAdt5cn6oZyuuZYAMORjvLpj5Yqxdnr+S3r0PVKXQFZZ4ozx813ASYkJOpfCl7/0T1V901Bs=
- References: <26954C8E-C987-4CD4-9887-310B6D00F004@gmail.com> <4735D4C2.6050102@physik.uni-muenchen.de> <F7B8D403-B274-4E0A-AF60-29ED89CAB022@gmail.com>
This is quadratic in the numbers of commons in a module. Please
make written_common a balanced tree (such as our BBT_HEADER &
associates, this would leave us with O(N log(N)) complexity) or a
hashtable (leaving us with O(N) or something like that).
Here's the updated patch, using a balanced tree. A careful review is
welcome, as it's the first time I deal with these bbt features.
Boostrapped and finishing regtesting on x86_64-linux. OK to commit if
it passes?
FX
Attachment:
pr30285_2.diff
Description: Binary data