One Million Lines Per Minute: SPITBOL/386 times for tokenizing and code generation

I’m making good progress on producing a version of SPITBOL for Linux.

One sign I’m on the right track is the performance that PC-SPITBOL delivers when run on Linux using Wine.

The translation is done in two steps.

The first step tokenizes the input, puts the operations in a standard form and drops the comments. This takes about 0.8 seconds to scan 31,000+ lines of MINIMAL source for v3.7, and produces just over 12,000 lines of tokenized instructions. This corresponds to about 2,325,000 lines/minute.

The second step generates assembly code for 386 for the 12,000 instructions. This results in 14,000 386 instructions and takes about 1.4 seconds. The scales up to about 500,000 statements/minute for the code generation phase.

The combined phases take just over 2 seconds to translate 31,000 lines of MINIMAL to 14,000 386 instructions. This corresponds to about 930,000 source lines per minute.

Not bad for a program written over 25 years ago.

And that’s before doing any tuning…

Advertisements

4 Comments

  1. Posted August 28, 2009 at 03:12 | Permalink | Reply

    Dave replies:

    I am making progress, and hope to have a 32-bit 8-bit character version in a couple of weeks. I have spent a significant amount of time rewriting the existing translators to put them in a more accessible form. I hope to update the files at the sourceforge project sight shortly, once the code is in a consistent state. Help debugging will be appreciated. Watch this blog for details, as I will write a post when the code is published. Help with doing/testing 16-bit character version for Unicode would also be appreciated, but I need to get base version going first.

    By the way, I am spending as much time on this as possible, which explains why there have been so few blog posts lately.

    Dear Dave,

    thank you for undertaking to port my beloved language to Linux. I hope you are making rapid progress. If I can help, I would like to do so. I have made some minor contributions to Phil Budne’s CSnobol (especially for the MS-DOS version). More than a decade ago, I produced a beta code interaction and analysis program for the beta code text and data files of the Thesaurus Linguae Graecae and other ancient textual material, using Mark Emmer’s SPITBOL386. The program involved much assembly language programming for sub routines (especially for screen graphics and speed), since I had decided to write the Greek characters to the screen in graphics mode. It is still widely used and runs smoothly under DOS emulation in a Linux environment.

    If I could hold a Linux SPITBOl in my hands some day, it would be like the realization of a dream.

    By the way: I learned the language at Oxford in the 80ies. My teacher was Susan Hockey. Other languages, in which I am sufficiently fluid to do serious productive work are C, C++, different kinds of assembly, Icon, Basic and Pascal. None of these comes as close to what I expect from a programming language as does SNOBOL4/SPITBOL. The more your undertaking is extremely welcome.

    With kind regards

    Burkhard Meissner

    • David Murphy
      Posted February 1, 2012 at 10:44 | Permalink | Reply

      Has anything happened about the Spitbol implementation no Linux? I found a spitbol site on google code but nothing for Linux. No chance of a mac os x port I suppose??

  2. Posted August 29, 2010 at 12:47 | Permalink | Reply

    Dear Dave,

    how far is the translation? Could you make any results available through the internet (google code page)? I would be grateful to you if you could do this. I have fingered a little with your first release (1,5 years ago), but since the machine description files were all missing, only tokenizing could be done with it.

    Best wishes

    Burkhard Meissner

  3. Burkhard Meißner
    Posted August 31, 2010 at 08:50 | Permalink | Reply

    Davem

    how is it going with SPITBOL/Linux? Any help needed? I would be interested in seeing the .hdr, .def and .cnd files which werde missing in the first edition, which stemmed from the sparc version

    Burkhard Meissner

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

  • Pages

  • July 2009
    M T W T F S S
    « Jun   Aug »
     12345
    6789101112
    13141516171819
    20212223242526
    2728293031  
  • RSS The Wayward Word Press

  • Recent Comments

    mrrdev on On being the maintainer, sole…
    daveshields on On being the maintainer, sole…
    James Murray on On being the maintainer, sole…
    russurquhart1 on SPITBOL for OSX is now av…
    dave porter on On being the maintainer, sole…
  • Archives

  • Blog Stats

  • Top Posts

  • Top Rated

  • Recent Posts

  • Archives

  • Top Rated

  • %d bloggers like this: