[sane-devel] C undefined operations in sane-backends-1.0.7-beta1
Tim Waugh
twaugh at redhat.com
Thu Jan 24 21:45:50 GMT 2002
On Thu, Jan 24, 2002 at 08:17:25PM +0100, Karsten Festag wrote:
> I read somewhere that ++bit would give faster code than bit = bit + 1.
> Now my question (as a non-expierienced programmer) is if
>
> ++bit;
> bit %= 8;
>
> is faster than your suggestion or do you think it makes no difference?
I think it can only be slower, since unless bit is a register then it
requires another memory store.
In general, write code for maintainability rather than speed; compiler
optimizations get better with time, and particular problem areas can
be found using profiling tools if need be.
Tim.
*/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/sane-devel/attachments/20020124/be08e029/attachment.sig>
More information about the sane-devel
mailing list