View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000133 | LDMud 3.5 | LPC Compiler/Preprocessor | public | 2004-09-30 10:05 | 2009-05-26 08:18 |
Reporter | Assigned To | ||||
Priority | low | Severity | feature | Reproducibility | N/A |
Status | new | Resolution | open | ||
Summary | 0000133: Faster function calls | ||||
Description | Calls to private/nomask functions could be made faster by skipping the argument massaging done for normal functions. Since the functions are private/nomask, the number of arguments taken is known at compile time and can be adjusted there. Omitting the control frame as well would be possible by storing the previous pc/ap on the stack as well, but for that we would need to mark these functions as inlineable in order to generate the correct 'return' code. This is probably just not worth it. A simple benchmark is in order, I think. | ||||
Tags | No tags attached. | ||||
|
Cool. Motivation to put a lot of "private" everywhere! ;) |
|
I don't have any hard facts/benchmarks here, but I once wrote some functions containing only a few instructions for implementing a kind of ring buffer in LPC. In the end, the function call overheads were so big, that arr=({foo}) + arr[1..]; was significantly faster (until a host system dependent size, typically around 70-110). In such cases, it would be interesting to save setting up the control frame and argument massaging. |