make tends to run fastest when set to use twice as many processes as there are CPUs, so there are cases where more threads/processes than CPUs can provide a performance benefit, generally because one can be working on its available data while another waits for more data to arrive (from disk, network, main memory, wherever). But you won't even get twice the performance out of that unless you're waiting on a very slow data source.
In this context, forking/threading just provides a way to minimize the CPU's idle time. If your CPU utilization is already at or near 100% (as it probably would be for a simple processor-bound task like this one), then you're not going to gain anything. Threads aren't magic enough to run the CPU at 110%, much less 1000%.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|