Dear Jim,

thanks a lot for your hard work which should prove that an efficient implementation of SRFI 154/155 is possible (although such an implementation cannot be portable).

I would probably make sense to write a paragraph in SRFI 155 about how to achieve optimal space and time behavior using your tricks. Could you write something more detailed about your algorithm (like pseudo-code)?

I have two questions remaining:

1) Do you want the API of (srfi 154) be extended so that your implementation of (srfi 155) can directly build on it?

2) You argue that we can save space by treating, continuations as lists (instead of copying them). However, on several occasions, you are filtering lists of marks. Don't you have to copy the lists for this?

Thanks again!

Marc

Jim Rees <xxxxxx@gmail.com> schrieb am Mo., 11. Juni 2018 um 02:43 Uhr:
On Sun, Jun 10, 2018 at 5:07 PM Jim Rees <xxxxxx@gmail.com> wrote:
On Sun, Jun 10, 2018 at 2:23 PM Jim Rees <xxxxxx@gmail.com> wrote:

It is confirmed.   O(N) space on (x+ (srfi-155-integers) N), as well as other tests, and parameter behavior checks out within the loop (parameters have their correct values).

TYPO!!   O(1) space on (x++ (srfi-155-integer) N) -- that' why I was so excited to have fixed this.


On Sun, Jun 10, 2018 at 5:07 PM Jim Rees <xxxxxx@gmail.com> wrote:
On Sun, Jun 10, 2018 at 2:23 PM Jim Rees <xxxxxx@gmail.com> wrote:

Thanks for your clearly-written example.   I'll confirm when I have more bounded-space tests passing with the proposed fix.

It is confirmed.   O(N) space on (x+ (srfi-155-integers) N), as well as other tests, and parameter behavior checks out within the loop (parameters have their correct values).

Congratulations and thank-you Marc!  The overall design across the three SRFIs is sound even if not a trivial porting effort.

-jim

To unsubscribe from this list please go to http://www.simplelists.com/confirm.php?u=3gmIi49Ouh6YpCluDZXWeokz7NgY9f9r