Hi,
Amirouche Boubekki writes:
[...]
> Now, I got another idea what if I replace the 'cons' returned
> by the traversi procedures by 'values' and replace the
> lambda with 'delay' with some use of 'force' at the correct
> places. It will result in the following procedures:
>
> (define-public (lis
(define (lazyseq-with-stream)
(list->stream (iota max)))
This is wrong.
It must be implemented as:
(define-stream (lazyseq-with-stream)
(stream-let loop ((v 1))
(stream-cons v (loop (+ 1 v)
I get the same segfault with the following error:
Too many heap sections: Increa
I figured how to benchmark this.
Here are the timings:
promise: 43s
lambda: 7s
And at the current 'max' value the srfi-41 streams can't complete
the benchmark with this error:
Too many heap sections: Increase MAXHINCR or MAX_HEAP_SECTS
Here is the benchmark program:
(use-modules (srfi srfi
On 2018-02-25 15:16, Amirouche Boubekki wrote:
Hello all,
I know it's not good to optimize first, but I got into it
and now I need to know.
A few months ago, I created a lazy sequence library that retains
history based on delayed continuation, it can be summarized
as follow:
(define-public (li
Hello all,
I know it's not good to optimize first, but I got into it
and now I need to know.
A few months ago, I created a lazy sequence library that retains
history based on delayed continuation, it can be summarized
as follow:
(define-public (list->traversi lst)
(let loop ((lst lst))
(l