<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Re-write "lemon" so that it doesn't fork nor spend most of its time on printf"
   href="https://llvm.org/bugs/show_bug.cgi?id=28279">28279</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Re-write "lemon" so that it doesn't fork nor spend most of its time on printf
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Test Suite
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Programs Tests
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>renato.golin@linaro.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>A recent review has pointed out that lemon is a broken design:

<a href="http://reviews.llvm.org/D21593">http://reviews.llvm.org/D21593</a>

Not only it has to fork 20 times to work around running the test with 20
different inputs, but it also spends "60-70% of the time is spend in fputs and
fputc".

>From what I can see, there's nothing stopping the code from operating from a
constant array instead of command line arguments. Even if it's called
differently for different targets / training dataset, it still can be a single
argument which chooses between different hard-coded choices.

Also, the fputs is probably not needed at all, and refactoring like we've done
before (accumulate the data in a small group of variables, keep them in memory,
etc) should be much more reliable and stress the compiler more than the current
situation.

Of course, larger arrays versus reduction have very different cost problems, so
we should stick to whatever is closer to the original intent, not the hacked up
implementation.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>