Open G3Kappa opened 2 years ago
Still, improving the lexer and parser should take priority. I recently added memoization here and there, and achieved a > 100% increase in parsing speed. I believe that a few orders of magnitude of optimization are still in reach, so autoloading should only be implemented once we get to diminishing returns on that front, or when there are so many Ergo files that parse times take longer than about 5s.
https://www.swi-prolog.org/pldoc/man?section=module-autoload
Reasoning
Since Ergo has a narrow scope, autoloading comes with all the upsides and virtually no downsides. Faster startup and fewer predicates in memory at a time means better overall performance.