Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Constantify *BIT-MAP* #10

Open
phoe opened this issue Feb 5, 2022 · 0 comments
Open

Constantify *BIT-MAP* #10

phoe opened this issue Feb 5, 2022 · 0 comments

Comments

@phoe
Copy link

phoe commented Feb 5, 2022

(declaim (type (simple-array (simple-bit-vector 4) (16)) *bit-map*))
(defvar *bit-map* #(#*0000
#*0001
#*0010
#*0011
#*0100
#*0101
#*0110
#*0111
#*1000
#*1001
#*1010
#*1011
#*1100
#*1101
#*1110
#*1111))

Perhaps you could try to use ALEXANDRIA:DEFCONSTANT with :TEST #'EQUALP to turn this into a constant, in order to avoid (dynamic) variable lookup at runtime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant