Original Post
One part of the library is a script engine that can access all of the functions of the library.
Perhaps if I were using function pointers this wouldn''t be a problem, but the script engine is using a switch statement(because everything I''ve learned so far leads me to believe the switch statement would be faster than calling a function).
The problem, this would mean the library is now twice as large, the code that''s in the function definition and a copy of that code within the switch statement. This also means I have the unpleasant job of making sure that each of the versions of the code are the same. Besides that, since all that code is going to be in the switch statement, aren''t I in danger of making a function too big for the stack or one that takes too long to set up so that it would be faster just to use the function pointers?
Would inlining the functions work for reducing the maintenance problem? Even if that works, is there a way to reduce the size and avoid stack problems?