Am 07.12.2010 16:16, schrieb Lin Rongrong:
> Just tested rev #6078, with TestBoolean function, the compiled size are the 
> same now, and "_Bool" is 4ms faster than "unsigned char".

On an original Z80 _Bool should be exactly three clock cycles faster per
loop iteration in your example. In terms of speed this is the main
advantage of _Bool over unsigned char: saving three clock cycles each
time we use it as a condition, be it in the ternary operator, an if/else
or some other control mechanism.

> Really a fast fix.
> But I am still uncomfortable with "_Bool", as my overall code size is still 
> a little larger with "_Bool".

Well there probably are still some places where sdcc generates
unnecessary casts for _Bool, this will improve over time (and the
improvmeent will be faster when users report the issue on this list (as
you did) or as a feature request (which has the advantage of not being
forgotten as easily)).

Philipp

------------------------------------------------------------------------------
What happens now with your Lotus Notes apps - do you make another costly 
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus 
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to