Back Midas Rome Roody Rootana
  Midas DAQ System  Not logged in ELOG logo
Entry  21 Aug 2009, Exaos Lee, Forum, Link error of "mcnaf" 
    Reply  21 Aug 2009, Konstantin Olchanski, Forum, Link error of "mcnaf" 
    Reply  31 Aug 2009, Exaos Lee, Forum, Link error of "mcnaf" 
       Reply  31 Aug 2009, Exaos Lee, Forum, Why should we use "INLINE" here? 
          Reply  03 Sep 2009, Stefan Ritt, Forum, Why should we use "INLINE" here? 
Message ID: 626     Entry time: 03 Sep 2009     In reply to: 623
Author: Stefan Ritt 
Topic: Forum 
Subject: Why should we use "INLINE" here? 

Exaos Lee wrote:
There are many "INLINE" definitions in "include/*.h". Both GNU C and C99 permit using inline functions. I still wonder why. Smile


The INLINE statements are a relict from times where a subroutine call was in the order of a few microseconds. This was when you probably were pretty young, and we had MS DOS PCs running at 66 MHz and 640 kB (not MB!) of memory. At that time, inlining the CAMAC functions gave a 50% speedup, believe it or not! I guess now this is completely obsolete, plus modern compilers can do inlining automatically if they realize that there is a benefit. So we should remove all the inline business. We plan some major rework later in September, so I will include that on the todo list there.

- Stefan
ELOG V3.1.4-2e1708b5