Hi all,
I am currently working with FPC 2.6.4.
For the math library I develope I do have a question on portable code. Naturally the lib contains a lot of statements like
X := X + a;
Using Inc instead will produce significantly faster executables on my Version of FPC. As I want to produce a lib that can be compiled with as many Pascal compilers as possible - the "portable" aspect - I do have the following questions
* is Inc/Dec a common Pascal language extension (or should I stay with the above for portablilty)?
* if Inc/Dec is not portable can I expect better optimization in the upcomming FPC 3.x.x Versions (so that i can stay with the above)?
If the answers two both questions are "no" then I do see two Options to make the high-speed version avail to FPC users
* I could define a compile time switch and integrate both variants in one source. However this will render the sources unreadable, as they will then mainly consist of "{ifdef ...} ... {endif}" instead of anything useful.
* I could translate the portable version into an optimized FPC version and include both in the package. However this will require me to maintain coherence between the two files (which are already >20.000 lines and double to end of this year).
Comments, suggestions anyone?
Kind regards,
MathMan