From: Lukas Wagner <l.wagner@proxmox.com>
To: Wolfgang Bumiller <w.bumiller@proxmox.com>
Cc: pbs-devel@lists.proxmox.com
Subject: Re: [pbs-devel] [PATCH v2 proxmox-backup 2/3] debug cli: add 'compare-content' flag to `diff archive` command
Date: Tue, 6 Dec 2022 15:44:07 +0100 [thread overview]
Message-ID: <41086f37-8fea-8cda-ae90-1c152ef4b047@proxmox.com> (raw)
In-Reply-To: <20221206113941.ozvlonsqil34impj@casey.proxmox.com>
Hi,
On 12/6/22 12:39, Wolfgang Bumiller wrote:
>> +{
>> + let mut buf_a = vec![0u8; BUFFERSIZE];
>> + let mut buf_b = vec![0u8; BUFFERSIZE];
>
> Maybe use a Box instead of a Vec, we don't ever resize this atm.
>
Do you mean like this?
let mut buf_a = Box::new([0u8; BUFFERSIZE]);
AFAIU this would construct the array on the stack first before it is moved into the Box,
leading to some unnecessary memcpys. Or am I missing something here?
next prev parent reply other threads:[~2022-12-06 14:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-05 14:55 [pbs-devel] [PATCH v2 proxmox-backup 0/3] debug cli: improve output, optionally compare file content for `diff archive` Lukas Wagner
2022-12-05 14:55 ` [pbs-devel] [PATCH v2 proxmox-backup 1/3] debug cli: show more file attributes for `diff archive` command Lukas Wagner
2022-12-05 14:55 ` [pbs-devel] [PATCH v2 proxmox-backup 2/3] debug cli: add 'compare-content' flag to " Lukas Wagner
2022-12-06 11:39 ` Wolfgang Bumiller
2022-12-06 14:44 ` Lukas Wagner [this message]
2022-12-06 15:01 ` Wolfgang Bumiller
2022-12-05 14:55 ` [pbs-devel] [PATCH v2 proxmox-backup 3/3] debug cli: add colored output " Lukas Wagner
2022-12-06 11:49 ` Wolfgang Bumiller
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=41086f37-8fea-8cda-ae90-1c152ef4b047@proxmox.com \
--to=l.wagner@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
--cc=w.bumiller@proxmox.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.