I get the impression you are confusing Pascal with an interpreted script.
I'm deliberately using $ifdefs here, this is supposed to be resolved at compile time. (And no, inline doesn't always work - already tried that.)
If you are "fighting" a speed problem, there may be other ways.
If you are not sure where time goes, get a linux environment and use callgrind (part of valgrind). Dont just try to squeeze micro optimizations (like inline, or pointers). See why some code is called more often, and if it can be changed.
You may be able to build very optimized "case like" jump tables at runtime (once during initialization).
But that is all theoretical, I dont know the codebase....
Also review how you organize and store data. Every cache miss costs time. Sometimes compacter data (even if it requires an extra statement) can be faster. But that is hard to predict again.
- If you run with threads: there are currently speed improvements in the works, in fpc trunk.
- If you work with managed types (strings/dyn array), check "implicit exceptions" and turning them off.