f******y 发帖数: 2971 | 1 我随便翻了一下,发现里边function member都直接定义在class里边,这样不是会让编
译后的程序变得臃肿吗? |
h*******e 发帖数: 225 | 2
Who told u that?
【在 f******y 的大作中提到】 : 我随便翻了一下,发现里边function member都直接定义在class里边,这样不是会让编 : 译后的程序变得臃肿吗?
|
f******y 发帖数: 2971 | 3 I remember functions defined in class are inline functions. |
p*******n 发帖数: 273 | 4 right
【在 f******y 的大作中提到】 : I remember functions defined in class are inline functions.
|
r*********r 发帖数: 3195 | 5 NR is known for its ugly code. gsl is better. |
b******a 发帖数: 215 | 6 what's GSL?
【在 r*********r 的大作中提到】 : NR is known for its ugly code. gsl is better.
|
k**f 发帖数: 372 | 7
Inline is just a hint to the compiler, which can ignore it completely as in
the case of bebug mode. In general, if a member function is too complicated
to the compiler, e.g. has a loop in the implementation, it will be compiled
as out of line function.
【在 f******y 的大作中提到】 : I remember functions defined in class are inline functions.
|
r*********r 发帖数: 3195 | 8 gsl is GNU scientific library. |
f******y 发帖数: 2971 | 9 right, so NR just gives everything to the compiler, and let it choose.
in
complicated
compiled
【在 k**f 的大作中提到】 : : Inline is just a hint to the compiler, which can ignore it completely as in : the case of bebug mode. In general, if a member function is too complicated : to the compiler, e.g. has a loop in the implementation, it will be compiled : as out of line function.
|