From b5a8032aaeaf2121a642ead32653d4288fa2983d Mon Sep 17 00:00:00 2001 From: Josh Triplett Date: Sun, 29 Jul 2007 22:32:22 -0700 Subject: [PATCH] cse: Size insn_hash_table more realistically, speeding up CSE significantly Profiling showed that Sparse spent much of its time doing CSE, which involved traversing every bucket of insn_hash_table repeatedly. insn_hash_table had 64K buckets, but never more than a few dozen entries. Shrink insn_hash_table to 256 entries. This makes Sparse 2-4 times faster for me. Signed-off-by: Josh Triplett --- cse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cse.c b/cse.c index 9370a6c0..2a157453 100644 --- a/cse.c +++ b/cse.c @@ -17,7 +17,7 @@ #include "linearize.h" #include "flow.h" -#define INSN_HASH_SIZE 65536 +#define INSN_HASH_SIZE 256 static struct instruction_list *insn_hash_table[INSN_HASH_SIZE]; int repeat_phase; -- 2.11.4.GIT