Daily Archives: July 5, 2009

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…

  • Pages

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

  • Recent Comments

    Sahana’s Respo… on A brief history of Sahana by S…
    Sahana’s Respo… on A brief history of Sahana by S…
    James Murray on On being the maintainer, sole…
    James Murray on On being the maintainer, sole…
    mrrdev on On being the maintainer, sole…
  • Archives

  • Blog Stats

  • Top Posts

  • Top Rated

  • Recent Posts

  • Archives

  • Top Rated