11:37:06cpli^ this snippet currently creates one large case statement which sbcl nicely compiles into a lut
11:48:47pjbcpli: I use (ecase expr (#.+foo+ +foo+) …) ; in both cases, you need to wrap the the defconstant in eval-when :compile-toplevel (or compile and load them separately first).
11:50:51cplipjb as in you create a list of 2-element lists as a toplevel compile-time constant and then use a macro?
11:54:04pjbYou may use a macro. In that case, you can generate both the defconstant and the functions to convert using the values directly. See for example: https://gitlab.com/com-informatimago/com-informatimago/-/blob/master/common-lisp/cesarum/utility.lisp#L389
12:01:29beachcpli: It is recommended to use '() to initialize the lexical variable to the empty list.