User Tools

Site Tools


wswan:guide:optimization

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
wswan:guide:optimization [2025/12/31 12:50] – [Optimizing for memory usage] asiewswan:guide:optimization [2025/12/31 12:50] (current) – [Optimizing for memory usage] asie
Line 17: Line 17:
   * For data stored in RAM, use the smallest type possible.   * For data stored in RAM, use the smallest type possible.
     * Exception: For argument passing, there is little reason to prefer ''%%char%%'' over ''%%int%%'' - the stack is always aligned to 2 bytes.     * Exception: For argument passing, there is little reason to prefer ''%%char%%'' over ''%%int%%'' - the stack is always aligned to 2 bytes.
-  * By default, GCC allows function call arguments to accumulate on the stack, then pops them all at once. To reduce stack usage at the cost of a larger and slightly slower program, compile your code with ''%%-fno-defer-pop%%''.+  * By default, GCC allows function call arguments to accumulate on the stack, then pops them all at once. To reduce peak stack usage at the cost of a larger and slightly slower program, compile your code with ''%%-fno-defer-pop%%''.
  
 ===== Optimizing assembly code ===== ===== Optimizing assembly code =====
wswan/guide/optimization.txt · Last modified: by asie