Skip to content

Use a hashmap for builtins

AdminXVII requested to merge AdminXVII/ion:hash-builtins into master
  • 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

Merge request reports