Upgrade ahash and compiler

This commit is contained in:
Avery Winters 2024-06-14 09:49:15 -05:00
parent ce41d503f5
commit 0c6d2b076f
Signed by: avery
SSH key fingerprint: SHA256:eesvLB5MMqHLZrAMFt6kEhqJWnASMLcET6Sgmw0FqZI
4 changed files with 22 additions and 20 deletions

4
Cargo.lock generated
View file

@ -4,9 +4,9 @@ version = 3
[[package]] [[package]]
name = "ahash" name = "ahash"
version = "0.8.8" version = "0.8.11"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42cd52102d3df161c77a887b608d7a4897d7cc112886a9537b738a887a03aaff" checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
"getrandom", "getrandom",

View file

@ -8,7 +8,7 @@ edition = "2021"
[dependencies] [dependencies]
clap = { version = "4.5.2", features = ["derive"] } clap = { version = "4.5.2", features = ["derive"] }
# This is the latest version that actually uses AES on arm64 # This is the latest version that actually uses AES on arm64
ahash = "=0.8.8" ahash = "0.8.11"
bumpalo-herd = "0.1.2" bumpalo-herd = "0.1.2"
anyhow = "1.0.80" anyhow = "1.0.80"
indicatif = "0.17.8" indicatif = "0.17.8"

View file

@ -14,6 +14,8 @@ use {
}, },
}; };
type HashBuilder = RandomState;
#[derive(Debug)] #[derive(Debug)]
struct Data { struct Data {
min: i64, min: i64,
@ -65,8 +67,8 @@ pub(crate) fn run(args: Args) -> Result<()> {
results.push(s.spawn(move || chunk(input, pb, city_bumper))); results.push(s.spawn(move || chunk(input, pb, city_bumper)));
start = end; start = end;
} }
let mut data: HashMap<&[u8], Data, RandomState> = let mut data: HashMap<&[u8], Data, HashBuilder> =
HashMap::with_capacity_and_hasher(UNIQUE_CITY_COUNT, RandomState::default()); HashMap::with_capacity_and_hasher(UNIQUE_CITY_COUNT, HashBuilder::default());
for res in results { for res in results {
let chunk_data = res.join().unwrap()?; let chunk_data = res.join().unwrap()?;
for ( for (
@ -155,9 +157,9 @@ fn chunk<'input, 'bump>(
mut input: &'input [u8], mut input: &'input [u8],
pb: ProgressBar, pb: ProgressBar,
city_bumper: Member<'bump>, city_bumper: Member<'bump>,
) -> Result<HashMap<&'bump [u8], Data, RandomState>> { ) -> Result<HashMap<&'bump [u8], Data, HashBuilder>> {
let mut data: HashMap<&'bump [u8], Data, RandomState> = let mut data: HashMap<&'bump [u8], Data, HashBuilder> =
HashMap::with_capacity_and_hasher(UNIQUE_CITY_COUNT, RandomState::default()); HashMap::with_capacity_and_hasher(UNIQUE_CITY_COUNT, HashBuilder::default());
let sep = Chunk::splat(b';'); let sep = Chunk::splat(b';');
let nl = Chunk::splat(b'\n'); let nl = Chunk::splat(b'\n');

View file

@ -10,11 +10,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1711099426, "lastModified": 1717408969,
"narHash": "sha256-HzpgM/wc3aqpnHJJ2oDqPBkNsqWbW0WfWUO8lKu8nGk=", "narHash": "sha256-Q0OEFqe35fZbbRPPRdrjTUUChKVhhWXz3T9ZSKmaoVY=",
"owner": "numtide", "owner": "numtide",
"repo": "devshell", "repo": "devshell",
"rev": "2d45b54ca4a183f2fdcf4b19c895b64fbf620ee8", "rev": "1ebbe68d57457c8cae98145410b164b5477761f4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -31,11 +31,11 @@
"rust-analyzer-src": "rust-analyzer-src" "rust-analyzer-src": "rust-analyzer-src"
}, },
"locked": { "locked": {
"lastModified": 1712211755, "lastModified": 1717827974,
"narHash": "sha256-KIJA4OvXFDXEeu7wstFDCxqZEfjaPQIowpzNww48TUw=", "narHash": "sha256-ixopuTeTouxqTxfMuzs6IaRttbT8JqRW5C9Q/57WxQw=",
"owner": "nix-community", "owner": "nix-community",
"repo": "fenix", "repo": "fenix",
"rev": "39763c6e23a8423af316b85a74bad0cc5bc88d86", "rev": "ab655c627777ab5f9964652fe23bbb1dfbd687a8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -66,11 +66,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1712163089, "lastModified": 1718160348,
"narHash": "sha256-Um+8kTIrC19vD4/lUCN9/cU9kcOsD1O1m+axJqQPyMM=", "narHash": "sha256-9YrUjdztqi4Gz8n3mBuqvCkMo4ojrA6nASwyIKWMpus=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "fd281bd6b7d3e32ddfa399853946f782553163b5", "rev": "57d6973abba7ea108bac64ae7629e7431e0199b6",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -92,11 +92,11 @@
"rust-analyzer-src": { "rust-analyzer-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1712156296, "lastModified": 1717583671,
"narHash": "sha256-St7ZQrkrr5lmQX9wC1ZJAFxL8W7alswnyZk9d1se3Us=", "narHash": "sha256-+lRAmz92CNUxorqWusgJbL9VE1eKCnQQojglRemzwkw=",
"owner": "rust-lang", "owner": "rust-lang",
"repo": "rust-analyzer", "repo": "rust-analyzer",
"rev": "8e581ac348e223488622f4d3003cb2bd412bf27e", "rev": "48bbdd6a74f3176987d5c809894ac33957000d19",
"type": "github" "type": "github"
}, },
"original": { "original": {