Last active
November 28, 2016 02:46
-
-
Save zhouqiang-cl/020ffebf7d25f05a4a1aa88c3bcf300a to your computer and use it in GitHub Desktop.
common lisp 的声明 INLINE, NOTINLINE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
语法 | |
(inline function-name*) | |
(notinline function-name*) | |
参数和值 | |
function-name --- 函数名 | |
上下文执行 | |
declaration 或 proclamation | |
描述 | |
inline 内联声明, 有了这个声明之后, 函数体中的代码将会直接被编译到调用这个函数的代码. | |
对于那些调用开销比函数体的执行代价还高的小型函数来说, inline 特别有价值.内联函数有两个限制: | |
1.递归函数不能内联 | |
2.如果一个内联函数被重新定义, 必须重新编译所有调用它的函数, 否则调用仍然是原来的定义 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment