#279 Accessing the stack

open
nobody
None
8
2012-02-22
2009-09-30
No

Accessing the stack is extremly inefficient in sdcc. This currently is sdcc's worst code quality problem for many ports. The problem can be seen in the attahced files:

stackhell.c, a minimal example.
stackhell2.c, which illustrates how bad the problem can become when using local aggregates.
device/lib/sdcc-mullong.c illustrates a real-world case, where sdcc generates approx. 700 bytes for Z80 vs. spprox 250 bytes for non-free HITECH-C and approx. 450 bytes for free z88dk. The situation is similar with other ports (unless compiling the function as not reentrant).

Discussion

  • Philipp Klaus Krause

    Minimal example

     
  • Philipp Klaus Krause

    • priority: 9 --> 8
     
  • Philipp Klaus Krause

    Reducing priority by one, since this performance problem is not as important as the standard-compliance problem addressed by the other priority 9 items.

    Philipp

     

Log in to post a comment.