Stack overflow on very long inputs #855
Labels
bug
Something isn't working
good first issue
Good for newcomers
perf
Performance (time or memory) related matters.
This is clearly evident when running the QASM benchmark suite, specifically 9symml_195.qasm. The problem is in
process-includes
, which uses tail recursion to loop over all the instructions. One solution is to add a localdeclare
form toprocess-includes
increasing the speed optimization to ensure that it uses tail recursion by default (at least in SBCL). Another solution is to use a loop. And the final option is to do nothing at all and assume any circuit long enough to exhaust the stack is simply too long for Quilc (since it blows the heap on my machine during addressing on this 9symml_195.qasm anyway)The text was updated successfully, but these errors were encountered: