G3Kappa / Ergo

Other
4 stars 0 forks source link

Module Autoloading #25

Open G3Kappa opened 2 years ago

G3Kappa commented 2 years ago

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.

G3Kappa commented 1 year 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.