<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div><br></div><div><br></div><hr id="zwchr" data-marker="__DIVIDER__"><div data-marker="__HEADERS__"><blockquote style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;" data-mce-style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><b>From: </b>"Steve Litt" &lt;slitt@troubleshooters.com&gt;<br><b>To: </b>ale@ale.org<br><b>Sent: </b>Wednesday, October 26, 2016 2:05:35 AM<br><b>Subject: </b>Re: [ale] Bash vs Perl<br></blockquote></div><div data-marker="__QUOTED_TEXT__"><blockquote style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;" data-mce-style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;">On Tue, 25 Oct 2016 11:01:40 -0400<br>leam hall &lt;leamhall@gmail.com&gt; wrote:<br><br>&gt; On Tue, Oct 25, 2016 at 10:57 AM, Steve Litt<br>&gt; &lt;slitt@troubleshooters.com&gt; wrote:<br>&gt; <br>&gt; &gt; On Mon, 24 Oct 2016 12:08:48 -0400<br>&gt; &gt; leam hall &lt;leamhall@gmail.com&gt; wrote:<br>&gt; &gt; &nbsp;<br>&gt; &gt; &gt; My unsolicited opinion, based off using Ruby, is that if the cost<br>&gt; &gt; &gt; of a fork is critical use C or Go. Otherwise, "a difference that<br>&gt; &gt; &gt; makes no difference is no difference". &nbsp;<br>&gt; &gt;<br>&gt; &gt; Bash **REALLY** slows for fork. Run the test program inside a big<br>&gt; &gt; loop. If I remember correctly, it's an order of magnitude slower<br>&gt; &gt; than the same loop in Python, all because of spawning test.<br>&gt; &gt;<br>&gt; &gt; High repetition loops in Bash are much worse than in Python or Perl.<br>&gt; &gt;<br>&gt; &gt; SteveT<br>&gt; &gt; &nbsp;<br>&gt; <br>&gt; Hey Steve, that was sort of my point. If the fork is run once a day<br>&gt; and takes 5 minutes instead of 2, is that really a problem? Granted<br>&gt; there are much better technical solutions, but if you only have so<br>&gt; much time to code, is the performace gain worth the effort?<br><br>Exactly! Bash is great for most stuff. The exception is iterating<br>through a directory with a thousand or so files, and for some reason<br>run the test executable on each. That could take 10 minutes for bash as<br>opposed to 30 seconds for Python and 8 seconds for C (these timings are<br>my best guesses).<br></blockquote><div><br></div><div>I feel the need to explain my disclaimer:</div><div><br data-mce-bogus="1"></div><div>I'm not bashing bash. &nbsp;:)</div><div><br data-mce-bogus="1"></div><div>For this project I need to use bash because it is available much earlier than Perl would be in the build. &nbsp;This would work be faster if I had a book that showed how to do X in Y (bash).</div><div><br data-mce-bogus="1"></div><div>To some extent I am doing this via google by doing searches on "How do I do X in bash"</div><div><br data-mce-bogus="1"></div></div></div></body></html>