zkas: Use fxhash as the IndexMap hasher.

This commit is contained in:
parazyd
2022-03-18 17:44:37 +01:00
parent adf0f6170b
commit 6aff6643af
3 changed files with 5 additions and 1 deletions

1
Cargo.lock generated
View File

@@ -1538,6 +1538,7 @@ dependencies = [
"drk-sdk",
"fast-socks5",
"futures",
"fxhash",
"group",
"halo2_gadgets",
"halo2_proofs",

View File

@@ -61,6 +61,7 @@ url = {version = "2.2.2", optional = true}
dirs = {version = "4.0.0", optional = true}
subtle = {version = "2.4.1", optional = true}
lazy_static = {version = "1.4.0", optional = true}
fxhash = {version = "0.2.1", optional = true}
indexmap = {version = "1.8.0", optional = true}
itertools = {version = "0.10.3", optional = true}
@@ -151,6 +152,7 @@ util = [
"serde_json",
"dirs",
"num-bigint",
"fxhash",
]
rpc = [

View File

@@ -1,5 +1,6 @@
use std::{iter::Peekable, str::Chars};
use fxhash::FxBuildHasher;
use indexmap::IndexMap;
use itertools::Itertools;
@@ -43,7 +44,7 @@ impl Parser {
// All the circuit statements
let mut circuit_statements = vec![];
let mut ast = IndexMap::new();
let mut ast = IndexMap::with_hasher(FxBuildHasher::default());
let mut namespace = String::new();
let mut ast_inner = IndexMap::new();
let mut namespace_found = false; // Nasty