tag:blogger.com,1999:blog-8084820023443893802.post3857406026897673370..comments2015-04-02T16:46:43.550+01:00Comments on random thoughts: Benchmarking function call overhead in C++Maxim Yegorushkinhttp://www.blogger.com/profile/13335665761944189051noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-8084820023443893802.post-71368837209113244612009-11-13T22:31:42.083+00:002009-11-13T22:31:42.083+00:00okokIvan Novickhttps://www.blogger.com/profile/00947651598150963143noreply@blogger.comtag:blogger.com,1999:blog-8084820023443893802.post-34771635163766472392009-11-13T15:30:47.787+00:002009-11-13T15:30:47.787+00:00I tried with no increment - same numbers.
It is i...I tried with no increment - same numbers.<br /><br />It is interesting that the difference between the results is about 0.3 nanosecond, which is the time of 1 CPU cycle on a 3GHz CPU I used.Maxim Yegorushkinhttps://www.blogger.com/profile/13335665761944189051noreply@blogger.comtag:blogger.com,1999:blog-8084820023443893802.post-65189402241063389642009-11-13T15:06:04.617+00:002009-11-13T15:06:04.617+00:00The code does an increment in the function calls r...The code does an increment in the function calls right? Does this mean that the 2 nanoseconds includes the number of time for the increment. I wonder how much of the time is for the function call and how much for the increment.<br /><br />Also I wonder the difference between doing the same code without a function call, because i would have thought -03 would inline this tiny function?Ivan Novickhttps://www.blogger.com/profile/00947651598150963143noreply@blogger.com