chibi-scheme/lib
Ekaitz Zarraga 967b888d8c Reduce iterations in concatenate!
This commit should reduce the amount of iterations in concatenate to N
where N is the sum of the lengths of the input lists.

The previous implementation iterated from the beginning in each
concatenation because of `last-pair`.

This implementation is significantly faster in this extreme case:

(concatenate! `(,(iota 50000) ,@(map list (iota 500))))

>> Previous implementation:
real	0m0.671s
user	0m0.658s
sys	0m0.013s

>> This implementation:
real	0m0.175s
user	0m0.174s
sys	0m0.001s

The tests is done using `time`, which is not reliable at all, but using
`(trace last-pair)` shows accurately what happens with the iterations.
2024-01-09 17:18:41 +01:00
..
chibi (chibi test): Put newlines after test results etc in verbose mode 2023-11-06 20:59:10 +01:00
scheme Adding missing length<=? (closes #909). 2023-04-02 22:48:51 +09:00
srfi Reduce iterations in concatenate! 2024-01-09 17:18:41 +01:00
init-7.scm propagate source info manually in let (issue #835) 2022-05-29 08:03:32 +09:00
meta-7.scm provide initial raw-script-file definition in meta-7.scm 2023-05-09 06:50:03 +09:00