Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #40350

Re: ANN: Dogelog: We Have Liftoff, We Have Liftoff

From Mostowski Collapse <janburse@fastmail.fm>
Newsgroups comp.lang.javascript
Subject Re: ANN: Dogelog: We Have Liftoff, We Have Liftoff
Date 2021-08-19 23:38 +0200
Message-ID <sfmivo$i4h$3@solani.org> (permalink)
References <s8h8nq$61e$1@solani.org>

Show all headers | View raw


Woa! The JavaScript JIT compiler is quite impressive. I now
ported Dogelog runtime to Python as well, so that I can compare
JavaScript and Python, and tested without clause indexing:

between(L,H,L) :- L =< H.
between(L,H,X) :- L < H, Y is L+1, between(Y,H,X).

setup :- between(1,255,N), M is N//2, assertz(edge(M,N)), fail.
setup :- edge(M,N), assertz(edge2(N,M)), fail.
setup.

anc(X,Y) :- edge(X, Y).
anc(X,Y) :- edge(X, Z), anc(Z, Y).

anc2(X,Y) :- edge2(Y, X).
anc2(X,Y) :- edge2(Y, Z), anc2(X, Z).

:- setup.
:- time((between(1,10,_), anc2(0,255), fail; true)).
:- time((between(1,10,_), anc(0,255), fail; true)).

The results are:

/* Python 3.10.0rc1 */
% Wall 188 ms, trim 0 ms
% Wall 5537 ms, trim 0 ms

/* JavaScript Chrome 92.0.4515.159 */
% Wall 5 ms, trim 0 ms
% Wall 147 ms, trim 0 ms

Mostowski Collapse schrieb:
> Dear All,
> 
> Needs a decent browser, JavaScript >2015
> 
> http://www.dogelog.ch/
> 
> Currently swallows errors silently. Everything written
> in Prolog itself, read/1, consult/1, etc.. and then cross
> compiled into JavaScript. Not sure whether it can already
> 
> compile itself. But it has a text field and can add the
> clauses in the text field and execute the directives in the
> text field, and it has write/1 and nl/0 into the HTML document.
> 
> More care for the good boy upcoming.
> 
> Have Fun!
> 
> Jan Burse, 24.05.2021 #StaySafe
> http://www.jekejeke.ch/

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

ANN: Dogelog: We Have Liftoff, We Have Liftoff Mostowski Collapse <janburse@fastmail.fm> - 2021-05-25 00:18 +0200
  Re: ANN: Dogelog: We Have Liftoff, We Have Liftoff Mostowski Collapse <janburse@fastmail.fm> - 2021-08-19 23:38 +0200
    Re: ANN: Dogelog: We Have Liftoff, We Have Liftoff Mostowski Collapse <bursejan@gmail.com> - 2021-08-19 14:40 -0700
      Re: ANN: Dogelog: We Have Liftoff, We Have Liftoff Mostowski Collapse <bursejan@gmail.com> - 2021-11-07 16:24 -0800

csiph-web