<div dir="ltr"><div class="gmail_quote">On 20 June 2012 16:46, Nadav Har'El <span dir="ltr"><<a href="mailto:nyh@math.technion.ac.il" target="_blank">nyh@math.technion.ac.il</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Wed, Jun 20, 2012, Oleg Goldshmidt wrote about "Re: Python question - first call is slower?":<br>
<div class="im">> I would - naively! - think that "stuff (not only, or necessarily, the<br>
> python code stuff, but also what it needs from the system) would indeed be<br>
> loaded dynamically when it is needed. I don't base this on anything I know,<br>
> but on the intuitive notion that whatever Python does works as "normal C<br>
> libraries" - it's implemented in C, right?<br>
<br>
</div>This is a good angle to investigate, although since I noticed the<br>
function becomes uniformly slower (after 1/3rd of the code, it spends<br>
1/3rd of 14 milliseconds), it would be strange that I am loading so many<br>
shared libraries for this to be so uniform, but I guess anything is<br>
possible.<br></blockquote><div><br>How about "strace -ttt" and "ltrace -ttt", could they reveal where your missing time is spent?<br><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> In general, t does not surprise me that something - whatever - runs slower<br>Yes, its sad that computer software has become so complex that often you<br>
don't understand what your program *really* does, and you start to<br>
accept annoying phenomenon as laws of nature :( In a few years, when<br>
software is as complex as human brains, I guess it would be normal to<br>
explain that some software is slower today because it is depressed ;-)<br></blockquote><div><br>Add to that code writers (I wouldn't dignify what they do by labeling it as "programming") who don't have the slightest idea of how even simple programs really work and you end up with a vicious circle of wasted CPU cycles.<br>
<br>--Amos<br><br></div></div><div dir="ltr">
<a href="http://www.linkedin.com/in/gliderflyer" target="_blank">
<span>
<img src="http://s4.licdn.com/scds/common/u/img/webpromo/btn_viewmy_160x25.png" alt="View my profile on LinkedIn" height="25" width="160">
</span></a></div><br>
</div>