Shop OBEX P1 Docs P2 Docs Learn Events
BST & the PPST — Parallax Forums

BST & the PPST

HumanoidoHumanoido Posts: 5,770
edited 2010-09-09 04:16 in Propeller 1
If a Spin program is compiled and run with the Parallax Propeller Software Tool, compared to BST, will there be any difference in the efficiency at which the two compiled versions run? (i.e. any differences in how they are converted to PASM..) Thanks much in advance.

Humanoido

Comments

  • Heater.Heater. Posts: 21,230
    edited 2010-09-09 03:52
    Humanoido:
    ...i.e. any differences in how they are converted to PASM.

    Spin code is not converted to PASM. Spin code is compiled to byte codes which are run by the Spin interpreter (I'm sure we've been over this before).

    Without any options set BST produces exactly the same byte codes as the Propeller Tool for the same source. In fact the entire binary is identical. Quite an amazing achievement I think.

    However BST does have options that enable optimisations and eliminate unused code etc. How much performance increase you can get I don't know.
  • jmspaggijmspaggi Posts: 629
    edited 2010-09-09 03:55
    Hi Humanoido,

    I don't know ;)

    But I just want to precise that Spin programs are not converted to PASM. They are converted to bytecodes, and then PASM application is interpreting it.

    I don't know why there is no Spin -> PASM compiler... Same for other langagues, Why do we need an interperter? Why can't we compile them to PASM? I don't know.

    JM
  • Heater.Heater. Posts: 21,230
    edited 2010-09-09 04:16
    jmspaggi:
    Why do we need an interperter? Why can't we compile them to PASM?

    I think the reasoning is that you can only have 496 instructions in a single COG, compiling a high level language like Spin into PASM is not going to get you very much functionality into that small space.

    Also the Propeller instruction set is not really tuned to the needs of a compiler. What with not having stack operations, indexed addressing etc etc.

    Solution is to use byte codes and an interpreter in order to get the maximum functionality out of the small memory spaces. But use PASM for small high speed stuff.
Sign In or Register to comment.