Skip to content

Commit 43a3713

Browse files
authored
Update G.FUD.01.md
加入 较少参数,存在性能收益可能性 的解释 原因如下 1,rust编译的 硬件指令对于较少函数参数会优先使用寄存器(大部分如此) 2,ffi 类型的函数,有明确规范定义
1 parent b857dd4 commit 43a3713

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/safe-guides/coding_practice/fn-design/G.FUD.01.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
**【描述】**
66

7-
为了提升代码可读性,函数的参数最长不宜超过五个。
7+
为了提升代码可读性,函数的参数最长不宜超过五个。根据编译器函数调用规范,较少的参数个数编译器优先使用寄存器,所以
8+
存在性能收益的可能性。
89

910
**【反例】**
1011

0 commit comments

Comments
 (0)