I have a very long loop that takes forever in playground because of the constant output. Is there a way to disable output for certain lines of code? I still want the whole thing to run, I just don't want to wait forever to see the result.
FYI - I know I can run the code on demand but that doesn't matter . It still takes forever. I don't mind it running continuously, I just want it to run without all of the output.
FYI - I also know that playground is not used for performance. I just don't want to wait forever to see a result. I'm not testing performance.
This question was answered in this post.
To summarize the portion relevant to your question: wrapping your code in a tuple will prevent it from having output in Xcode Playgrounds and speed up execution time.
For example:
input: var x = 10 // output: 10
input: (var x = 10) // output: None
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