scryer-prolog icon indicating copy to clipboard operation
scryer-prolog copied to clipboard

random_integer/3 slow, maybe rename it, and support bignum

Open Jean-Luc-Picard-2021 opened this issue 2 years ago • 0 comments

I get:

/* Scryer Prolog */
?- time((between(1,10000,_), random_expr(0,_,L,[]), fail; true)).
   % CPU time: 1.800s
   true.

But then:

/* SWI-Prolog */
?- time((between(1,10000,_), random_expr(0,_,L,[]), fail; true)).
% 463,876 inferences, 0.094 CPU in 0.100 seconds (93% CPU, 4948011 Lips)
true.

Thats a factor 18, much slower than what we usually expect as the ratio between Scryer Prolog and SWI-Prolog.

Jean-Luc-Picard-2021 avatar Apr 16 '22 22:04 Jean-Luc-Picard-2021