On 18.04.2016 22:58, Nick Hill wrote:

> 
> I don't believe the Cosmic compiler free version is supposed to lack
> optimisation found on the paid for version. However, I'm not
> particularly impressed with the Cosmic compiler since I have defined a
> constant expression featuring a raised to the power expression. No run
> time variables, no globals affected.  An inclusion of a reference to
> this constant results in the code growing from about 3.6k to nearly
> 8k. All the floating point math functions find their way into the
> final code, and doesn't even currently reference a run-time variable.
> The constant expression can and I believe should be evaluated at
> compile time, and superfluous math functions shouldn't find their way
> into the final release binary.
> 
> Should I expect SDCC to do better, and to optimise away functions
> which are not dependent on run time variables?

While SDCC has different optimizations from Cosmic, and in some cases
will optimize better or worse than Cosmic, in this case it probably
won't matter much. SDCC does not currently optimize calls to float
functions with constant arguments either.

Philipp


Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to