From: Nick Clifton <nickc@redhat.com>
To: Oleg Tolmatcev <oleg.tolmatcev@gmail.com>, binutils@sourceware.org
Subject: Re: [PATCH] make coff_compute_checksum faster
Date: Wed, 3 May 2023 15:39:31 +0100 [thread overview]
Message-ID: <a1a9e7c7-128f-0b91-04c1-4a03179aa0a4@redhat.com> (raw)
In-Reply-To: <CACcXsZjzrLPP5Ngo2bt20hkCQF+uvZ2syNvz5rW-bha_mDTfQw@mail.gmail.com>
Hi Oleg,
> This makes linking faster by reading 8 MB of data at once instead of
> reading 2 bytes at once. This drastically reduces the number of system
> calls.
Thanks very much. I have applied your patch with one small change:
> + buf = (unsigned char *)bfd_malloc (0x800000);
I replaced the use of a magic number in the malloc, and subsequent
read, with a #define'd value:
buf = (unsigned char *) bfd_malloc (COFF_CHECKSUM_BUFFER_SIZE);
It just makes it easier to change the buffer size, should that
become needed in the future.
Cheers
Nick
next prev parent reply other threads:[~2023-05-03 14:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-27 18:24 Oleg Tolmatcev
2023-05-03 14:39 ` Nick Clifton [this message]
2023-05-03 18:10 ` Oleg Tolmatcev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a1a9e7c7-128f-0b91-04c1-4a03179aa0a4@redhat.com \
--to=nickc@redhat.com \
--cc=binutils@sourceware.org \
--cc=oleg.tolmatcev@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).