﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	difficulty
1852	csc is absurdly inefficient when compiling large procedure calls	zaifir		"Try compiling the following trivial module with CHICKEN 5:

{{{
(module foo *
  (import (scheme))
  (define bar
    (list (make-string 0)
          (make-string 1)
          ;; ...
          (make-string 4999)))
  )
}}}

That's an invocation of `list` to 5000 `make-string` invocations. On my system, this generates a > 15 MB C source file, which takes at least 10 minutes to compile (I gave up & sent a SIGTERM).

Replacing the list with a 5000-element vector & then converting to a list, e.g.

{{{
  (define bar
    (let ((vec (make-vector 5000)))
      (vector-set! vec 0 (make-string 0))
      ;; ...
      (vector-set! vec 4999 (make-string 4999))
      (vector->list vec)))
}}}

results in fairly normal compilation times. But this is a very ugly workaround when your intention is to compile a procedure call with a large number of arguments.
"	defect	closed	major	6.0.0	compiler	5.4.0	fixed			
