| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
I was trying to eliminate all the places where we copied a Program
(about 4100 bytes) except for the one final copy into a Box; but that
approach was proving too annoying. Even returning a Program via Result
will cause multiple unnecessary copies that don't optimize out.
This patch switches approaches, and instead allocates a Vec<Instruction>
presized to the correct capacity. This allocation is made as early as
possible and retained for the lifetime of the program if necessary.
This means we'll never avoid a heap allocation, but we can always
avoid extra copies and we don't need a separate Box for interpreted
programs.
Performance effects are subtle. Overall wallclock time doesn't change
much. Cachegrind shows some accesses moving up from RAM to L2 cache.
Using GDB to probe memcpy sizes shows that large (>1024b) memcpy are now
totally gone in the generate-interp test.
Signed-off-by: Micah Elizabeth Scott <[email protected]>
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Closer inspection of the CPU counters showed that the branching in
RegisterSet::index() was a big problem, contributing to the overall
CPU frontend stall bottleneck in program generation.
This new version is less general, and closer to the appraoch used by
the original C implementation. We store a sorted ArrayVec of in-set
registers, and most operations construct the RegisterSet only once
using a combined filter predicate.
Choosing a register from a set is now cheaper in branches, instructions,
and L1 cache space. We now very rarely manipulate an entire RegisterSet
in any way other than by selecting a register randomly. (Just for the
register R5 special case.)
Wallclock time benchmarks:
generate-interp improves, -7.0%
generate-x86_64 improves, -7.2%
Cachegrind benchmarks:
generate_interp_1000x, more total instructions run but a large
decrease in frontend cache misses. +4.6% instructions, +11% L1
accesses, -99% L2 access, -40% RAM access.
generate_compiled_100x, +4.0% instructions, +9.4% L1 access.
cache miss improvements: -57% L2 access, -25% RAM access.
Signed-off-by: Micah Elizabeth Scott <[email protected]>
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
There was a special case in writer_pair_allowed for making add and
subtract equivalent. This patch changes RegisterWriter's encoding, using
per-opcode variants instead of per-format variants. The Add/Sub merge
can now happen earlier, when RegisterWriter is constructed.
Before and after RegisterWriter sizes are the same, at 8 bytes.
This patch removes many uses of Option<RegisterWriter> in favor
of using a new RegisterWriter::None default, and passes by value
rather than by reference.
Wallclock time benchmarks:
generate-interp improves, -7.5%
generate-x86_64 improves, -5.3%
Cachegrind benchmarks:
generate_interp_1000x, negligible change in total instructions,
improvement in cache footprint: -22.8% L2 accesses
Signed-off-by: Micah Elizabeth Scott <[email protected]>
|
| |\ \ \
| | | |
| | | |
| | | |
| | | | |
Fix a few typos.
See merge request tpo/core/arti!1532
|
| | | | |
| | | |
| | | |
| | | | |
I spotted these while I was working on something else.
|
| |/ / / |
|
| |\ \ \
| | | |
| | | |
| | | |
| | | | |
Fix a few warnings from nightly clippy
See merge request tpo/core/arti!1533
|
| | | | | |
|
| |/ / / |
|
| |\ \ \
| | | |
| | | |
| | | |
| | | | |
tor-netdir: Add separate functions for computing hsdirs for upload/download.
See merge request tpo/core/arti!1518
|
| | | | |
| | | |
| | | |
| | | | |
`HsBlindId` is `Copy`.
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | | |
When `hs_dirs` is removed this won't n't need to be public anymore.
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The hsdir selection algorithm for uploads and downloads is different
enough to justify splitting `hs_dirs` into 2 different functions.
More specifically, when selecting the relays to upload a service's
descriptors to, the service's `hsids` need to be matched up with the
correct `ring` (using the time period) before applying `select_nodes` to
pick the replicas. This is not the case when downloading, because
for downloads select relays from the current ring.
|
| | | |/
| |/|
| | |
| | |
| | |
| | | |
These will become useful when we split `hs_dirs()` into 2 separate
functions (one for uploading/services, and another for
downloading/clients).
|
| |\ \ \
| |/ /
|/| |
| | |
| | | |
hsserrvice: resolve many TODOs in ipt_establish.rs
See merge request tpo/core/arti!1522
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | | |
We don't actually want to distinguish drop from not-drop.
|
| | | |
| | |
| | |
| | | |
Needed for ClientCirc::wait_for_close
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
We need a type that holds a rend_handshake::IntroRequest object
internally, but where we don't materialize that object from the
Introduce2 message inside the MsgHandler, since that's more crypto
than we want to put in that task.
|
| | | |
| | |
| | |
| | | |
This ensures that the status becomes Faulty when the reactor exits.
|
| | | |
| | |
| | |
| | | |
This does not yet do exactly what's documented, but it's closer.
|
| | | |
| | |
| | |
| | |
| | | |
(This requires us to change the type of the data sent in the
stream. I hope to put it back soon.)
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | | |
This solves some problems but introduces a few new ones; I've tried
to open comments for the latter.
|
| | | | |
|
| |/ / |
|
| |\ \
| | |
| | |
| | |
| | | |
Resolve (mostly) RUSTSEC-2023-0052
See merge request tpo/core/arti!1534
|
| | | |
| | |
| | |
| | |
| | | |
We've solved this for rustls-webpki, but tls-api (which arti-hyper
uses) still requires the unmaintained webpki crate. See #1016.
|
| | | | |
|
| |\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
proto: new ClientCirc::send_raw_msg function.
Closes #1010
See merge request tpo/core/arti!1525
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | | |
Closes #1010.
|
| |\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
Upgrade num_enum dependency to 0.7
See merge request tpo/core/arti!1530
|
| | | |_|/
| |/| | |
|
| |\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
Resolve warnings about ambiguous/redundant doc links
See merge request tpo/core/arti!1531
|
| | | |_|/
| |/| |
| | | |
| | | |
| | | | |
Nightly rustdoc now warns if you have a link that isn't necessary,
and if you have a link that might refer to two different things.
|
| |\ \ \ \
| |/ / /
|/| | |
| | | |
| | | | |
hsservice: Compute rendezvous points correctly.
See merge request tpo/core/arti!1521
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This duplicates some code from hsclient as noted in the comments;
it might be good to reduce this, but the remaining nontrivial
duplication is small, and the logic flow is slightly different
because of the two-step process.
|
| | | | | |
|
| |\ \ \ \
| |_|/ /
|/| | |
| | | |
| | | |
| | | |
| | | | |
upgrade serde to >=1.0.184 to not use prebuilt blob
Closes #1011
See merge request tpo/core/arti!1526
|