Closed
Description
The file located here: https://gist.github.com/swgillespie/37b32f7b09ae536df8dc when compiled using rustc rustc_abuse.rs -o rustc_abuse -Z time-passes
takes approximately 9 seconds and 40MB of memory to compile on stable and beta, while taking almost a minute and 4GB of memory on nightly.
The Bad Thing being done here is that there are several massive matches. As expected, match checking takes a few seconds, but the real culprit here seems to be "MIR dump", which is where the memory usage peaks. The memory usage is high enough to get my Travis CI build killed that has some code similar to this, but not as extreme.
These numbers were gathered with:
rustc 1.5.0-nightly (4826f9625 2015-10-21)
rustc 1.4.0-beta.3 (20eba406f 2015-10-16)
rustc 1.3.0 (9a92aaf19 2015-09-15)
.- Mac OS X 10.10.5