shell, perl, performance, parallelism, profiling, etc.

Jerry Feldman gaf at blu.org
Wed Oct 22 19:48:50 EDT 2008


On 10/22/2008 03:49 PM, Kevin D. Clark wrote:
> Jerry Feldman writes:
>
>   
>> However, my thought is that if you are concerned with the
>> performance of a shell or Perl script, then you have the wrong
>> language, and should consider a more traditional compiled
>> language. On the BLU server, we had a script that would convert
>> mailman passwords to htpasswords. The shell script took many minuted
>> (I think it was over 30 at the time) where I rewrote it in C++, and
>> it took something like seconds. Scripts, whether written in BASH,
>> CSH, or Perl are very useful, but they have their place. I've seen
>> whole applications written entirely in scripts (Unixshell, Perl,
>> DCL), but once performance becomes an issue then you really need a
>> binary solution.
>>     
>
> I kind-of agree with this, but on the other hand, I'm sure you'll
> agree with me when I state that "before you throw out an interpreted
> implementation of a program, you owe it to yourself to ensure that
> you're at least using at least using a reasonably efficient
> algorithm".
>
> I.e. bubblesort written in Perl is going to get clobbered by shellsort
> written in C.
>   
Bubblesort is one of the slowest sorting algorithms in any language. 
Shell sort is not all that good either, that is why we have quicksort. 
Algorithms are very important regardless of programming language, and 
data structures tie directly into this.

-- 
Jerry Feldman <gaf at blu.org>
Boston Linux and Unix
PGP key id: 537C5846
PGP Key fingerprint: 3D1B 8377 A3C0 A5F2 ECBB  CA3B 4607 4319 537C 5846


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 251 bytes
Desc: OpenPGP digital signature
Url : http://mail.gnhlug.org/mailman/private/gnhlug-discuss/attachments/20081022/6925f96a/attachment.bin 


More information about the gnhlug-discuss mailing list