<br><div class="gmail_quote">On Wed, Jan 7, 2009 at 3:42 AM, Jason Garrett-Glaser <span dir="ltr"><<a href="mailto:darkshikari@gmail.com">darkshikari@gmail.com</a>></span> wrote:<br><div> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">> We found that the time it took x264 to create a<br>
> thread and then subsequently destroy the thread once it was done doing<br>
> its business was killing a significant amount of time<br>
<br>
</div>Last time I did this test, that process (thread destruction+creation)<br>
took on the order of one microsecond. Which is why it wasn't<br>
committed.<br></blockquote><div>One thing is the actual thread creation time, but when you constantly create and destroy threads, you don't give the OS any change to schedule them properly. Similar to the way you cannot judge threading efficiency on CPU usage, you cannot judge the cost of thread creation/destruction on creation/destruction time alone, but you should benchmark it in a real-world scenario.<br>
<br>My _guess_ is that with fast encoding settings thread creation/destruction is becoming a significant overhead on Quad++Cores, especially since x264 is becoming faster and faster.<br><br>Either way - using a thread pool is playing it safe, since I cannot see any drawbacks by using it.<br>
<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Dark Shikari<br>
<div><div></div><div class="Wj3C7c">_______________________________________________<br>
x264-devel mailing list<br>
<a href="mailto:x264-devel@videolan.org">x264-devel@videolan.org</a><br>
<a href="http://mailman.videolan.org/listinfo/x264-devel" target="_blank">http://mailman.videolan.org/listinfo/x264-devel</a><br>
</div></div></blockquote></div><br>
<br clear="all">Regards, Klaus Post<br><br><a href="http://sh0dan.blogspot.com">http://sh0dan.blogspot.com</a> (My projects)<br><a href="http://klauspost.blogspot.com">http://klauspost.blogspot.com</a> (Personal)<br><a href="http://kpgallery.blogspot.com">http://kpgallery.blogspot.com</a> (My Photo Gallery)<br>