Nп/п : 61 из 87
 От   : Markus Triska                       2:5075/128        04 сен 23 19:48:55
 К    : Mild Shock                                            04 сен 23 20:44:02
 Тема : Re: Autum Challenge, 42 is the Answer
----------------------------------------------------------------------------------
                                                                                 
@MSGID: <m2msy1n81k.fsf@logic.at> 92266295
@REPLY:
<bdad9f24-5b6a-49a8-98f9-3c2dd3e20be1n@googlegroups.com> b24231fc
@REPLYADDR Markus Triska <triska@logic.at>
@REPLYTO 2:5075/128 Markus Triska
@CHRS: CP866 2
@RFC: 1 0
<f4ad7701-cae3-4513-8b8e-a483415c6ad8@googlegroups.com><977d5e9f-469f-4516-9260-
26e917bbec2cn@googlegroups.com><142ae65f-61ad-403e-8450-caebfddf6d0an@googlegrou
ps.com><4e9bf208-0882-4f63-b243-b434f0a1392cn@googlegroups.com><3a23c78d-d4a1-47
2a-a460-776a5ca7d3een@googlegroups.com> oglegroups.com><030ed934-efa4-4a1e-96b4-96f9c5214a6en@googlegroups.com> -2c33-42f6-9630-2828418aa146n@googlegroups.com><868d4f75-c293-4929-83b7-e319f4db
a451n@googlegroups.com><m2r0njgghs.fsf@logic.at><37516061-91b6-4129-8221-4bdb0fa
59f42n@googlegroups.com><6c9c0d39-8658-47b8-8526-2fd11e08fc71n@googlegroups.com>
<bdad9f24-5b6a-49a8-98f9-3c2dd3e20be1n@googlegroups.com>
@RFC-Message-ID: <m2msy1n81k.fsf@logic.at>
@TZUTC: 0200
@PID: Emacs/27.0.50
@TID: FIDOGATE-5.12-ge4e8b94
Mild Shock <bursejan@gmail.com> writes:

> Whats the Scryer Performance of this Example?
>
> /* GNU Prolog 1.5.0 */
> ?- between(1,200,N), length(L,N), nth_member(I,L,E), fail; true.
> (94 ms) yes
>
> /* SWI-Prolog 9.1.14 */
> ?- time((between(1,200,N), length(L,N), nth_member(I,L,E), fail; true)).
> % 94,504,524 inferences, 4.766 CPU in 4.767 seconds (100% CPU, 19830457 Lips)
> true.

With Scryer Prolog 0.9.2 on my machine, I get:

    ?- time((between(1,200,N), length(L,N), nth_member(I,L,E), false; true)).
       % CPU time: 84.182s
       true.

On my machine, that`s ca. 15 times slower than SWI 8.3.15, which is the
last SWI version I found installed on this machine. Newer versions may
well be faster! For best performance, I recommend to build Scryer Prolog
with the optional --release flag, i.e.:

    $ cargo build --release

All the best,
Markus

-- 
comp.lang.prolog FAQ: http://www.logic.at/prolog/faq/
The Power of Prolog:  https://www.metalevel.at/prolog
--- Emacs/27.0.50
 * Origin: man (2:5075/128)
SEEN-BY: 5001/100 5005/49 5015/255 5019/40 5020/715
848 1042 4441 12000
SEEN-BY: 5030/49 1081 5058/104 5075/128
@PATH: 5075/128 5020/1042 4441



   GoldED+ VK   │                                                 │   09:55:30    
                                                                                
В этой области больше нет сообщений.

Остаться здесь
Перейти к списку сообщений
Перейти к списку эх