public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Oleg Tolmatcev <oleg.tolmatcev@gmail.com>
To: Nick Clifton <nickc@redhat.com>
Cc: binutils@sourceware.org
Subject: Re: [PATCH] make coff_compute_checksum faster
Date: Wed, 3 May 2023 20:10:13 +0200	[thread overview]
Message-ID: <CACcXsZgvx4zgGpKjV=TxLzNCyv7KnonBbgtqeCeqZ2tptfDm6Q@mail.gmail.com> (raw)
In-Reply-To: <a1a9e7c7-128f-0b91-04c1-4a03179aa0a4@redhat.com>

Am Mi., 3. Mai 2023 um 16:39 Uhr schrieb Nick Clifton <nickc@redhat.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

Thank you, Nick.

      reply	other threads:[~2023-05-03 18:10 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
2023-05-03 18:10   ` Oleg Tolmatcev [this message]

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='CACcXsZgvx4zgGpKjV=TxLzNCyv7KnonBbgtqeCeqZ2tptfDm6Q@mail.gmail.com' \
    --to=oleg.tolmatcev@gmail.com \
    --cc=binutils@sourceware.org \
    --cc=nickc@redhat.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).