Faster WHICHEVER
Currently whichever
builds an inline binary search tree with O(log n) complexity. Some implementations (for example sbcl) can optimize case
with clauses being consecutive integers, which would allow for O(1) complexity.
While alexandria's goal is to be portable, that doesn't mean that it should ignore possible implementation-specific optimizations. There already exists implementation-specific code: see alexandria:emptyp
, alexandria:simple-reader-error
or alexandria::default-element-type
in io.lisp
.