Hi Nil,

Here is the result, but i don't really understand it:

$ guile --no-auto-compile
GNU Guile 2.0.11
Copyright (C) 1995-2014 Free Software Foundation, Inc.

Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.

Enter `,help' for help.
scheme@(guile-user)> (use-modules (opencog atom-types))
started1 atom-types.scm
finished atom-types.scm
scheme@(guile-user)> ,t (load-from-path 
"conceptnet/opencog/conceptnet4.scm")
$1 = (InheritanceLink (stv 1 0.000625)
   (ConceptNode "computer" (stv 0.00018 0.001186))
   (ConceptNode "playroom" (stv 1e-06 0.001186))
)
;; 81.438993s real time, 83.566977s run time.  4.311136s spent in GC.
scheme@(guile-user)> ,t (load-from-path "/home/rocket/mysrc/atom_utils.scm")
;; 0.001712s real time, 0.001706s run time.  0.000000s spent in GC.
scheme@(guile-user)> (cnt-all)
$2 = 139916

The Answer of course is that it loads the 60K rules into atomspace in 81 
seconds which is only 5.5x slower than loading the compiled rules in using 
my (now unnecessary) workaround.  However, I noted that it did not compile 
the Conceptnet4.scm file into a Conceptnet4.go file.

So what I don't understand, is why does Scheme/Guile bother to compile the 
rules at all for this file into byte code if it can execute it without 
compilation and if compilation takes a really long time due to the n^2 
execution proportion factor.  Your work-around is better than mine (as we 
don't have to split the files up manually and compile them).  I just don't 
understand why Guile does byte code compilation at all for these cases.

I also see that I can manually compile a Scheme/Guile .scm file  using 

$guild compile foo.scm

I could experiment later to see if compiling outside of the Guile shell 
eliminates the n^2 problem compile execution time problem, i.e. a linear 
time compilation would be nice.  But, if we don't need to compile for 
performance, I would not bother with it.

Your thoughts?

Best,

Mike




On Thursday, June 1, 2017 at 3:06:51 PM UTC-4, Nil wrote:
>
>
>
> On 06/01/2017 08:30 PM, rocketpwr.com wrote: 
> > 
> >     "however you're workaround might speed up subsequent loading. How 
> >     faster 
> > 
> > is it once already compiled? " 
> > 
> > scheme@(guile-user)> ,t (load-from-path "loadConceptnet4.scm") 
> > 
> > compiled splits/cnet4.1.scm 
> > 
> > compiled splits/cnet4.2.scm 
> > 
> > compiled splits/cnet4.3.scm 
> > 
> > [...redacted loading files 4-58...] 
> > 
> > compiled splits/cnet4.59.scm 
> > 
> > compiled splits/cnet4.60.scm 
> > 
> > compiled splits/cnet4.61.scm 
> > 
> > ;; 13.424310s real time, 13.906361s run time.  1.137787s spent in GC. 
>
> That seems pretty good. Do you know how that compares to using 
>
> --no-auto-compile 
>
> in the first place? 
>
> Thanks, 
> Nil 
>
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> > Groups "opencog" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> > an email to [email protected] <javascript:> 
> > <mailto:[email protected] <javascript:>>. 
> > To post to this group, send email to [email protected] 
> <javascript:> 
> > <mailto:[email protected] <javascript:>>. 
> > Visit this group at https://groups.google.com/group/opencog. 
> > To view this discussion on the web visit 
> > 
> https://groups.google.com/d/msgid/opencog/e6de7f7a-be7c-488a-8d00-ad559dac76c2%40googlegroups.com
>  
> > <
> https://groups.google.com/d/msgid/opencog/e6de7f7a-be7c-488a-8d00-ad559dac76c2%40googlegroups.com?utm_medium=email&utm_source=footer>.
>  
>
> > For more options, visit https://groups.google.com/d/optout. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"opencog" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/opencog.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/opencog/1f12fe7e-5dcd-48cc-bcd7-0420b6895735%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to