Closed melisgl closed 1 year ago
If this is a bottleneck, maybe going a bit further and making alist-hash-table/no-dups
a macro would be appropriate?
The set of supplied hash table initargs is fixed so the make-hash-table
call wouldn't need apply
and would become optimizable by the implementation.
SBCL, for example, analyses the initargs at compile time and directly calls a specialized constructor if possible (Not applicable in this case since :size
trips up the compiler macro).
Bottleneck is a strong word, but it's a ~1% win for MGL-PAX documentation generation. Rewrote it as a macro. Test of Esrap, 3BMD and MGL-PAX all pass.
Merged, thanks.
Another micro optimisation.