From 54c7882a759a08c4ef3d79f7d9b1aa8ed53322ac Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Thu, 3 Apr 2014 09:40:18 +0200 Subject: [PATCH] Minor CSE optimization * module/language/tree-il/cse.scm (cse): Use hashq instead of modulo to convert a full-width hash value to a vector index. --- module/language/tree-il/cse.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/language/tree-il/cse.scm b/module/language/tree-il/cse.scm index 5d0277f39..d4cf68619 100644 --- a/module/language/tree-il/cse.scm +++ b/module/language/tree-il/cse.scm @@ -1,6 +1,6 @@ ;;; Common Subexpression Elimination (CSE) on Tree-IL -;; Copyright (C) 2011, 2012, 2013 Free Software Foundation, Inc. +;; Copyright (C) 2011, 2012, 2013, 2014 Free Software Foundation, Inc. ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public @@ -194,7 +194,7 @@ (define (hasher n) - (lambda (x size) (modulo n size))) + (lambda (x size) (hashq n size))) (define (add-to-db exp effects ctx db) (let ((v (vector exp effects ctx))