eff_i_g has asked for the wisdom of the Perl Monks concerning the following question:

Monks,

I'm the only Perl guy in our department and the others have been using SPITBOL for years. There has been a recent suggestion by the uppers to move all programming to Perl and this has caused quite a stir. I cannot find any detailed comparisons between the two--I don't know SPITBOL and they don't know Perl.

Wikipedia tells me that "well-written programs compiled using the SPITBOL implementation of the SNOBOL4 programming language are often ten or more times faster in execution than a corresponding Perl program." Keep in mind that this statement is marked with "citation needed." Another search indicated better regex.

Can any one provide me with a comparison of the two, whether from links or experience?

Thanks.
  • Comment on Moving from SPITBOL to Perl (a comparison)

Replies are listed 'Best First'.
Re: Moving from SPITBOL to Perl (a comparison)
by jdtoronto (Prior) on Sep 26, 2006 at 21:27 UTC
    Does it still exist? Well it must! I haven't seen a SPITBOL reference in close on 20 years.

    The reference to a 10 fold speed increase may refer to the comparison of SNOBOL4 and SPITBOL-360 on IBM-360 series mainframes. When SPITBOL came out it was supposed to be 10 times faster than SNOBOL4.

    The comaprison with Perl will be very application sensitive, SPITBOL was renowned in the 70's for its implementation of regular expressions, but in those days there was really nothing to compare it to. For pure text processing SPITBOL may in fact be faster than Perl, but for anyhting else I think it will be so grossly lacking in features these days that Perl, or pretty much anything else, would leave it way behind.

    jdtoronto

Re: Moving from SPITBOL to Perl (a comparison)
by runrig (Abbot) on Sep 26, 2006 at 21:27 UTC
    Depending on what the task is, SPITBOL/SNOBOL just may be a better fit than Perl. And since your shop has a lot of SPITBOL experience, that makes it even more likely to be the better choice. Why not run your own benchmark with some "typical" task, measuring both development and execution time? If you're really ambitious, write a Inline::SNOBOL module, and get the best of both worlds :-)
Re: Moving from SPITBOL to Perl (a comparison)
by RMGir (Prior) on Sep 27, 2006 at 11:37 UTC
    MAKE_DECISION GT(PerlSpeedAndUtility,SPITBOLSpeedAndUtility) : S(U +SE_PERL),F(USE_SPITBOL)
    :)

    Wow, I hadn't thought of SNOBOL in years. I had to look up how to write that.

    I'm not sure what the answer is as to which would be better for your needs, but surely it's easy to write a few simple micro-benchmark programs in both and compare the speeds?

    As a way of learning SPITBOL, maybe you should take the simplest piece of SPITBOL currently in use and try to reimplement it in perl. That would also give you a useful "application-level" benchmark more suited to your organization...


    Mike
Re: Moving from SPITBOL to Perl (a comparison)
by eff_i_g (Curate) on Sep 27, 2006 at 14:46 UTC
    More information:

    The task is text processing; whatever formats they receive are converted to a delimited file and processed from there.

    "Pure text processing" can still lead to using the language to its fullest--I'm guessing you mean opening a file, running replaces, and closing the file; nothing more? (A while(<>){s///;}in Perl). I'm wondering where SPITBOL stands in terms of nested data structures, modules, and the like.

    The benchmarking is a good idea; I'll have to see what comes out of this meeting and if they want to spend time on comparisons, or if the decision is really already made. I just wanted to go into this as educated as possible--Thanks for your feedback.