-
is there any advantage to allowing guile to compile atomese hypergraphs or is that a mistake? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
A three-part answer:
2a) Use 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 4x or 8x faster. Created by our pal Alexey Potapov. There are two ways of using it. If I recall correctly, then this should work:
That should work. There is also a fancier API to this loader, with a demo here: https://github.com/opencog/atomspace/blob/master/examples/atomspce/persist-store.scm |
Beta Was this translation helpful? Give feedback.
-
p.s. I converted the original github issue to a “github discussion forum”. I have never used discussion forums before, so .. we’ll see how it goes. |
Beta Was this translation helpful? Give feedback.
A three-part answer:
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.
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, calledload-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 …