Skip to content

Is it worth it to compile scheme atomese #2917

Answered by linas
mjsduncan asked this question in Q&A
Discussion options

You must be logged in to vote

A three-part answer:

  1. If a file contains mostly "ordinary" scheme code, then yes, let guile compile it. It does this only once, and the code will run faster.

  2. If the file contains mostly plain Atomese, then there is no advantage to compiling. In fact, waiting for the compile to happen is infuriatingly slow. This can be overcome in two ways. These are:

2a) Use (load-primitive "some-file.scm") There's also a variant, called load-primitve-from-path or something like that, that uses assorted default search paths. Search engines know more.

2b) if the file is huge (e.g. genome data) and is "pure" Atomese, then there is an even faster way: there is a custom loader in the atomspace that runs …

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by linas
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #2916 on February 19, 2022 03:26.