Skip to content
Snippets Groups Projects
Commit 49c07f6a authored by ram's avatar ram
Browse files

Encode pairs with shifting, not multiplication.

parent f4420486
No related branches found
No related tags found
No related merge requests found
......@@ -405,8 +405,8 @@
; the following two functions encode indices so that gelm can
; decode them as fast as possible
(defun encode-pair (a b) (+ (* 10000. (1- a)) (1- b)))
;"plus" changed to "+" by gdw
(defun encode-pair (a b)
(logior (ash (1- a) encode-pair-shift) (1- b)))
(defun encode-singleton (a) (1- a))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment