码迷,mamicode.com
首页 > 系统相关 > 详细

The difference between macro and function(from c and pointer )

时间:2016-05-02 13:05:45      阅读:244      评论:0      收藏:0      [点我收藏+]

标签:

macro is typeless and execute faster than funtion ,becaus of the overhead of calling and returnning of function,but macro will increase the size of program due  to many time‘s substitution,as well as the side effect of macro  may cause unexpected results,to avoid this ,you‘d better make the arguments bracketed as possible as you can,on the contrary ,the result of function is more predicted.

macro :definitine commom argument ,little funtion such as MAX,MIN,

function :specific module or operation 

The difference between macro and function(from c and pointer )

标签:

原文地址:http://www.cnblogs.com/zeroArn/p/5452099.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!