I currently have a lot of print statements in SML code, and I'm traversing a very large tree, so it takes a while for all the print statements to be printed, but right now I don't want to see any print statements and just want to see it run as fast as possible. But I don't want to comment all the prints because I later need them again to debug something else. So I just want to be able to temporarily disable them for this run of the code.
I'm using the SML/NJ compiler.
As the first line in your code put the definition
fun print x = ();
Then -- your code will still work but the prints will do nothing.
Delete that line when you want to re-enable print
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With