Date: Sat, 28 Aug 2010 15:18:10 -1000 From: Gary Dunn <osp@aloha.com> To: perryh@pluto.rain.com, kc5vdj.freebsd@gmail.com Cc: freebsd-usb@freebsd.org Subject: Re: writing usb drivers under 8.x Message-ID: <4c799393.wU/d2YpTieErDrD7%perryh@pluto.rain.com>
next in thread | raw e-mail | index | archive | help
Why not just do the assignment? Save memory? perryh@pluto.rain.com wrote: >Jim Bryant <kc5vdj.freebsd@gmail.com> wrote: > >> what kind of idiot defines a constant assignment for a 32k buffer as a >> 15 bit left shift of 1? >> >> clever, yes. but in production, stupid. >> >> a constant should be just that, a constant, and thus require no >> computation at runtime. > >Er, did you bother to look at the generated code before spouting off? >Most compilers, even as far back as K&R 1st edition, will compute >constant expressions like that at compile time. >_______________________________________________ >freebsd-usb@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-usb >To unsubscribe, send any mail to "freebsd-usb-unsubscribe@freebsd.org" >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4c799393.wU/d2YpTieErDrD7%perryh>
