<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" <slitt@troubleshooters.com><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 <leamhall@gmail.com> wrote:<br><br>> On Tue, Oct 25, 2016 at 10:57 AM, Steve Litt<br>> <slitt@troubleshooters.com> wrote:<br>> <br>> > On Mon, 24 Oct 2016 12:08:48 -0400<br>> > leam hall <leamhall@gmail.com> wrote:<br>> > <br>> > > My unsolicited opinion, based off using Ruby, is that if the cost<br>> > > of a fork is critical use C or Go. Otherwise, "a difference that<br>> > > makes no difference is no difference". <br>> ><br>> > Bash **REALLY** slows for fork. Run the test program inside a big<br>> > loop. If I remember correctly, it's an order of magnitude slower<br>> > than the same loop in Python, all because of spawning test.<br>> ><br>> > High repetition loops in Bash are much worse than in Python or Perl.<br>> ><br>> > SteveT<br>> > <br>> <br>> Hey Steve, that was sort of my point. If the fork is run once a day<br>> and takes 5 minutes instead of 2, is that really a problem? Granted<br>> there are much better technical solutions, but if you only have so<br>> 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. :)</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. 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>