From 7b9f32300ee0a249c0872302c97635b460e45ba5 Mon Sep 17 00:00:00 2001 From: Kirill Chibisov Date: Mon, 24 Jul 2023 06:11:25 +0000 Subject: Use ahash instead of fnv and regular hash function After evaluation of the ahash with the data alacritty uses it was discovered that it's 1.5-2x times faster when getting the already hashed values, which is the primary cases for alacritty's renderer. Given that ahash is generally faster, all the HashSet and HashMap's inside the alacritty were changed to use it as a hasher function. --- Cargo.lock | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'Cargo.lock') diff --git a/Cargo.lock b/Cargo.lock index 1dbb4dff..1dd0b2a0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8,10 +8,23 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "ahash" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" +dependencies = [ + "cfg-if 1.0.0", + "getrandom", + "once_cell", + "version_check", +] + [[package]] name = "alacritty" version = "0.13.0-dev" dependencies = [ + "ahash", "alacritty_config", "alacritty_config_derive", "alacritty_terminal", @@ -23,7 +36,6 @@ dependencies = [ "crossfont", "dirs", "embed-resource", - "fnv", "gl_generator", "glutin", "home", -- cgit v1.2.3-54-g00ecf