【发布时间】:2016-01-23 20:05:57
【问题描述】:
最好通过代码示例来询问:
typedef struct {
... // Fields take up many bytes (>= 32 bytes)
} some_struct;
void alternative_1(some_struct arg);
void alternative_2(const some_struct *arg);
假设这两种函数替代方案都是在已编译的二进制文件中实现的(因此不能内联),函数调用开销是否存在差异?
【问题讨论】:
标签: c performance struct function-calls