<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/arti.git/crates/hashx/src/compiler/util.rs, branch arti-v2.1.0</title>
<subtitle>mirror of https://gitlab.torproject.org/tpo/core/arti
</subtitle>
<id>http://git.dilluti0n.com/mirrors/arti.git/atom?h=arti-v2.1.0</id>
<link rel='self' href='http://git.dilluti0n.com/mirrors/arti.git/atom?h=arti-v2.1.0'/>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/'/>
<updated>2025-08-07T15:28:36Z</updated>
<entry>
<title>Switch Cargo.toml files to edition 2024.</title>
<updated>2025-08-07T15:28:36Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2025-08-06T01:19:58Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=77b0de43b8c67cdb81befe0680a3df43b6ad37bc'/>
<id>urn:sha1:77b0de43b8c67cdb81befe0680a3df43b6ad37bc</id>
<content type='text'>
First, run

```
git grep -l "^edition =" |
    xargs perl -i -pe 's/^edition *=.*/edition = "2024"/;'
```

Second, manually verify that all Cargo.toml files have changed,
and nothing else has changed.

Third, run cargo fmt again.
</content>
</entry>
<entry>
<title>Fix typos</title>
<updated>2024-01-08T18:19:11Z</updated>
<author>
<name>Dimitris Apostolou</name>
<email>dimitris.apostolou@icloud.com</email>
</author>
<published>2024-01-04T18:32:22Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=4eb54be0657862f5d56b047c16c08dabde6a7377'/>
<id>urn:sha1:4eb54be0657862f5d56b047c16c08dabde6a7377</id>
<content type='text'>
</content>
</entry>
<entry>
<title>hashx: Avoid memcpy in Assembler::finalize()</title>
<updated>2023-08-25T19:46:44Z</updated>
<author>
<name>Micah Elizabeth Scott</name>
<email>beth@torproject.org</email>
</author>
<published>2023-08-25T19:46:44Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=9d081f70363cac0a8de073588cf75f6870153dee'/>
<id>urn:sha1:9d081f70363cac0a8de073588cf75f6870153dee</id>
<content type='text'>
This is a very simple change, just passing 'self' by reference instead of
value. The by-value version generates a memcpy of the entire temporary
program buffer which doesn't optimize out like I expected it would.

The juicy impact here is a much lower cache footprint for compilation,
since we avoid having yet another temporary storage location for the program
data.

generate_compiled_1000x
  Instructions:           271682605 (-0.627292%)
  L1 Accesses:            341834751 (-0.813903%)
  L2 Accesses:                56420 (-39.48365%)
  RAM Accesses:                 618 (-20.25806%)
  Estimated Cycles:       342138481 (-0.867660%)
</content>
</entry>
<entry>
<title>hashx: Assembly buffer sizing and tidying</title>
<updated>2023-08-21T22:27:28Z</updated>
<author>
<name>Micah Elizabeth Scott</name>
<email>beth@torproject.org</email>
</author>
<published>2023-08-19T00:21:23Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=52dbdbea3b9d1c1ca0c0842facbd08bd3106bd59'/>
<id>urn:sha1:52dbdbea3b9d1c1ca0c0842facbd08bd3106bd59</id>
<content type='text'>
I was looking for ways to optimize out the many redundant capacity
checks in the Assembler. I didn't find any promising approaches, but
I also saw no evidence that it was an important bottleneck. (A simple
unsafe fix didn't improve any important metrics)

While I was in there, I tightened up the buffer size definitions for
both x86_64 and aarch64, and added assertions to test the limits we
set for the size of prologue, epilogue, and single instructions.

I kept some of the inlining and data type tweaks, even though benchmarks
show no difference. They seem like a step in the right direction, from
the disassembly at least.

Signed-off-by: Micah Elizabeth Scott &lt;beth@torproject.org&gt;
</content>
</entry>
<entry>
<title>equix, hashx: Additional comment tweaks</title>
<updated>2023-07-27T20:17:23Z</updated>
<author>
<name>Micah Elizabeth Scott</name>
<email>beth@torproject.org</email>
</author>
<published>2023-07-27T20:17:23Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=9257949b80f5ae29136ffa3dc97efa7716d29210'/>
<id>urn:sha1:9257949b80f5ae29136ffa3dc97efa7716d29210</id>
<content type='text'>
More review feedback. Thanks nickm!

Signed-off-by: Micah Elizabeth Scott &lt;beth@torproject.org&gt;
</content>
</entry>
<entry>
<title>tor-hspow, equix, hashx: Comment tweaks</title>
<updated>2023-07-27T14:20:14Z</updated>
<author>
<name>Micah Elizabeth Scott</name>
<email>beth@torproject.org</email>
</author>
<published>2023-07-20T01:25:04Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=4affddaa0866955eafaea1c1ce6c3b240f206782'/>
<id>urn:sha1:4affddaa0866955eafaea1c1ce6c3b240f206782</id>
<content type='text'>
Making a few comment tweaks suggested in review feedback.

Signed-off-by: Micah Elizabeth Scott &lt;beth@torproject.org&gt;
</content>
</entry>
<entry>
<title>Reimplement HashX in Rust</title>
<updated>2023-07-27T14:20:06Z</updated>
<author>
<name>Micah Elizabeth Scott</name>
<email>beth@torproject.org</email>
</author>
<published>2023-06-28T21:59:46Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=a8756f2bce9f0dba8e445baae82aab90aa9ad096'/>
<id>urn:sha1:a8756f2bce9f0dba8e445baae82aab90aa9ad096</id>
<content type='text'>
This is a new pure Rust implementation of the HashX algorithm
designed by tevador for Tor's onion service proof of work puzzle v1.

HashX is a lightweight family of randomly generated hash functions.
A seed, via blake2 and siphash, drives a program generation model
which randomly selects opcodes and registers while following some
constraints that avoid timing stalls or insufficient hash mixing.

The execution of these hash funcions can be done using a pure Rust
interpreter, or about 20x faster using a very simple just in time
compiler based on the dynasm assembler crate. This has been
implemented for x86_64 and aarch64.

Signed-off-by: Micah Elizabeth Scott &lt;beth@torproject.org&gt;
</content>
</entry>
</feed>
