Use a hashmap for builtins
- Pro: Better performance (~10x based on the new benchmark) for accessing builtins
- Pro: Better and more generic API, with potential for context-only commands (ex: no history in non-interactive context)
- Con: Small memory usage increase
&Fn
is used to avoid performance hit with boxed commands, but this means builtins must outlive the shell (which for now does not seem a problem, as builtins are only ever added on context switch).
Edited by AdminXVII