users-prolog
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why does happen?


From: Daniel Diaz
Subject: Re: Why does happen?
Date: Thu, 18 Oct 2012 13:03:47 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121011 Thunderbird/16.0.1

Hi Dave,

I suppose the long time needed is due to the compiler (consult calls the compiler) trying to optimize registers (in some cases it is very costly - I have to modify this).
However, to check this, can you send me the source file you try to consult (a compressed file by private mail would be fine) ?

Daniel

Le 18/10/2012 11:45, Dave Sworin a écrit :
I generated a list with 501 items in it.  Each item in the list is a list with the form [N,LOG_OF_N_FACTORIAL]. N is an integer from 0 to 500.  LOG_OF_N_FACTORIAL is a float and, except for the trivial cases, all have exactly 15 significant digits.  For example, [2,0.301029995663981] and [500,1134.08640853513].  When I put it in a file "test.pl" as a predication like my_log_n_factorial([[0,0.0],[1,0.0],[2,0.301029995663981],...,[500,1134.08640853513]]). all by itself and try to consult it in the gprolog (1.3.1 or 1.4.1) interpreter, I must increase the GLOBALSZ to a very large value to get it to successfully consult the file.  Both systems being 64-bit I made GLOBALSZ=1920000.  When the consult('test.pl') is successful I query "my_log_n_factorial(X)." and the answer is "no".  If I cut the list in half, everything works fine, with either the top half or the bottom half of the list.  Also, if I consult my own prolog file, which has a lot of predicates defined, and then paste into the gprolog interpreter "LIST = [[0,0.0],[1,0.0],[2,0.301029995663981],...,[500,1134.08640853513]],my_prolog_pred(LIST,TREE)." and then the call succeeds without a problem.  Why can't I consult a file with a predication with a single argument which is an array of 500 rows by 2 columns?  It seems to me I should be able to do this.  Why does the query say "no" if perhaps there is not enough memory for the query?  Also, why does it take around 20 seconds to compile?  The text file which contains the list is 11560 bytes in size.
 
Dave

--
Ce message a été vérifié par MailScanner pour des virus ou des polluriels et rien de suspect n'a été trouvé.

_______________________________________________
Users-prolog mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/users-prolog


--
Ce message a été vérifié par MailScanner pour des virus ou des polluriels et rien de suspect n'a été trouvé.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]