Graeme Geldenhuys wrote:
On 03/09/12 14:05, Mark Morgan Lloyd wrote:

Except that modifying the compiler to generate highly-optimised code for
specific high-level tasks is probably more work than having a fragment
of assembler that needs to be written once per target CPU.


And writing the assembler for that one task fixes ONE problem, but still needs to be rewritten for all other target CPU's. Improving the assembler generated by FPC improves many tasks at once.

I very carefully used the word "specific", and I was thinking of cases where the compiler was able to recognise e.g. IntToStr() and apply knowledge of typical usage in its optimisations. You might remember that things like the Sieve of Eratosthenes went out of vogue as benchmarks specifically because compilers were recognising the code and "cheating".

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to