Replies: 1 comment 4 replies
-
Hi,
The second number is the real time, also called wall clock time. The first number is the CPU time. In your case your efficiency was something of the order of 35%. That is not high. There can be various reasons for this.
1: If you have far less memory than the size of the buffers you are using, the system may need to swap frequently. Swapping can cost very much time, in which the wall clock keeps ticking, but your program is just waiting.
2: You are running several programs in a computer with fewer processors than the number of programs you run. In that case they all get only a part of the pie.
3: Your buffersettings are such that the internal caching during the sorting needs to wait very often for a physical hard disk. If the disk access time is 8msec and you pick up only small amounts of data each time, you spend a lot of time waiting for the disk.
4: You use constructions in which you pick up the contents of brackets, and you have lots of ’small’ brackets and you do not use a bracket index.
Probably there are many more potential causes, but these are the first ones I can think of.
… On 17 Jan 2025, at 21:30, Joachim Brod ***@***.***> wrote:
Hi,
a question -- what is the meaning of the two times returned by the #printtimes statement?
In particular, I noticed that occasionally there is a big discrepancy in the two times, and I suspect this means that my code is running in a very inefficient way. (E.g., I have output like 7618.88 sec out of 21418.01 sec.) If this is true, is there any generic advice as to what could be causing this, and how to avoid it?
Thanks!
—
Reply to this email directly, view it on GitHub <#610>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABJPCEUBMUUSRP3PRVFVWID2LFR5PAVCNFSM6AAAAABVMVJKUWVHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZXHAZTMNZWHA>.
You are receiving this because you are subscribed to this thread.
|
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
a question -- what is the meaning of the two times returned by the
#printtimes
statement?In particular, I noticed that occasionally there is a big discrepancy in the two times, and I suspect this means that my code is running in a very inefficient way. (E.g., I have output like
7618.88 sec out of 21418.01 sec
.) If this is true, is there any generic advice as to what could be causing this, and how to avoid it?Thanks!
Beta Was this translation helpful? Give feedback.
All reactions