1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-10 14:00:21 +02:00

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.
This commit is contained in:
Andy Wingo 2014-04-03 09:40:18 +02:00
parent 3e1b97c1b0
commit 54c7882a75

View file

@ -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))