Shop OBEX P1 Docs P2 Docs Learn Events
Stack effects — Parallax Forums

Stack effects

mirrormirror Posts: 322
edited 2007-07-25 02:57 in Propeller 1
For·the next review of the Propeller Manual:

Could you please include the amount of stack space required for each of the spin functions and operators?

That would make for one less bit of "magic" when writing spin code.

Comments

  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-07-25 00:52
    Even if we provided that information, it would still take considersable effort to calculate the depth of stack needed. Some stack operations are serial (produced then consumed immeadiatly) and some are cumulative (stays on the stack for a period of time). What is much more utilitarian is using Phil's stack observer object, it pre-seeds the stack to detect the maximum depth it achieves.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • mirrormirror Posts: 322
    edited 2007-07-25 01:08
    Wow, best/worst stack numbers would be great!

    I think the manual would also benefit from best/worst number of clock cycles.

    That way a programmer can get a feel for which operations can be expected to be "expensive" both time- and stack-wise. A cheaper alternative is often available, but getting a feel for what will and wont be expensive is a real guessing game at the moment.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-07-25 02:57
    http://forums.parallax.com/showthread.php?p=577317

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
Sign In or Register to comment.