I am using Mathematica 12, take a look at below two runs
I already using
Short to shorten output. The first run shows
Short is quick. But the second run without
; takes 10 seconds to just output several numbers? Though the timing is weirdly quick.
I also tried command line
math, there is no problem with command line mathematica.
What is wrong with my front end? Any workarounds?
There are already several comments now, Thank you so much. Let me summarize as below:
compare below three runs
RandomReal[1., 1000000] RandomReal[1., 1000000] // Short RandomReal[1., 1000000] // Shallow
There are several weird points:
Shallowis fast, the other two are equally extremely slow. With
;, they are all fast. Considering
Shortare quite similar, this is really weird.
menqon three expression all gives
7.62958, so output size is not a key factor here.
- Bob Hanlon reported that macOS does not suffer from this problem. So only windows and linux suffer.