diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2015-05-22 14:46:51 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2015-05-22 15:05:25 +0100 |
commit | c89bd681d34d3339771ebdde8aa468b1d9ab042b (patch) | |
tree | 0ea00d69f31a18cabd0ea0f6879d60dce952ae1c /testsuite/tests/ghci.debugger | |
parent | eae703aa60f41fd232be5478e196b661839ec3de (diff) | |
download | haskell-c89bd681d34d3339771ebdde8aa468b1d9ab042b.tar.gz |
Fix quadratic behaviour in tidyOccName
In the test program from comment:3 of Trac #10370, it turned out
that 25% of all compile time was going in OccName.tidyOccName!
It was all becuase the algorithm for finding an unused OccName
had a quadratic case.
This patch fixes it. THe effect is pretty big:
Before:
total time = 34.30 secs (34295 ticks @ 1000 us, 1 processor)
total alloc = 15,496,011,168 bytes (excludes profiling overheads)
After
total time = 25.41 secs (25415 ticks @ 1000 us, 1 processor)
total alloc = 11,812,744,816 bytes (excludes profiling overheads)
Diffstat (limited to 'testsuite/tests/ghci.debugger')
-rw-r--r-- | testsuite/tests/ghci.debugger/scripts/print027.stdout | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/testsuite/tests/ghci.debugger/scripts/print027.stdout b/testsuite/tests/ghci.debugger/scripts/print027.stdout index 5db21839ae..3117eace87 100644 --- a/testsuite/tests/ghci.debugger/scripts/print027.stdout +++ b/testsuite/tests/ghci.debugger/scripts/print027.stdout @@ -1,6 +1,6 @@ + = (_t1::Num a => a -> a -> a) print = (_t2::Show a1 => a1 -> IO ()) log = (_t3::Floating a2 => a2 -> a2) -head = (_t4::[a3] -> a3) -tail = (_t5::[a4] -> [a4]) -fst = (_t6::(a5, b) -> a5) +head = (_t4::[a4] -> a4) +tail = (_t5::[a7] -> [a7]) +fst = (_t6::(a11, b) -> a11) |