Toxaris / pts

Interpreter for functional pure type systems.
BSD 3-Clause "New" or "Revised" License
21 stars 7 forks source link

Recover performance by disabling debug #88

Closed Blaisorblade closed 10 years ago

Blaisorblade commented 10 years ago

With profiling, this goes from 20 to 6 seconds. Without profiling, I've seen something like from 6 to 2 seconds.

Feel free to reenable this code if you figure out how to make it cheap.

Toxaris commented 10 years ago

Why comment out both the calls to the log operations and their implementations? Wouldn't it be enough to comment out the calls?

Toxaris commented 10 years ago

Maybe we can use static variability to enable or disable logging at compile time, like everyone does :) The easiest thing would be to use #ifdef's in Control.Monad.Log, defining the macro via a cabal flag. Alternatively, we could use two variants of Control.Monad.Log that are linked into the program according to the cabal flag.

Blaisorblade commented 10 years ago

Why comment out both the calls to the log operations and their implementations? Wouldn't it be enough to comment out the calls?

Just because I just hacked this together quickly. Can fix :-).

Toxaris commented 10 years ago

I'm working on this right now.

Toxaris commented 10 years ago

See Blaisorblade/pts#2.