GNU bug report logs - #72688
big lets are deathly slow

Previous Next

Package: guile;

Reported by: spacecadet <spacecadet <at> purge.sh>

Date: Sat, 17 Aug 2024 20:51:02 UTC

Severity: normal

To reply to this bug, email your comments to 72688 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guile <at> gnu.org:
bug#72688; Package guile. (Sat, 17 Aug 2024 20:51:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to spacecadet <spacecadet <at> purge.sh>:
New bug report received and forwarded. Copy sent to bug-guile <at> gnu.org. (Sat, 17 Aug 2024 20:51:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: spacecadet <spacecadet <at> purge.sh>
To: bug-guile <at> gnu.org
Subject: big lets are deathly slow
Date: Sat, 17 Aug 2024 20:47:03 +0000
performance of let seems to be about O(n^2) for n bindings

bash script to reproduce


range="$1"
time guile --no-auto-compile <( printf "(let ("; for i in $(seq 0 $range); do printf "(foo%s 'bar)" $i; done; printf ") '())" )


$ ./let.sh 10000

real    0m1.059s
user    0m1.306s
sys     0m0.064s

$ ./let.sh 20000

real    0m3.901s
user    0m4.197s
sys     0m0.078s

$ ./let.sh 40000

real    0m14.955s
user    0m15.707s
sys     0m0.188s

$ ./let.sh 80000
./let.sh: line 2:  6182 Segmentation fault      guile --no-auto-compile <( printf '(let ('; for i in $(seq 0 $range); do printf '(foo%s '"'"'bar)' $i; done; printf ") '())" )

real    0m58.146s
user    0m59.156s
sys     0m0.326s




This bug report was last modified 305 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.