On Tuesday 06 February 2007 2:48 pm, Pete Zaitcev wrote: > On Tue, 6 Feb 2007 13:08:19 -0800, Inaky Perez-Gonzalez <[EMAIL PROTECTED]> > wrote: > > > [btw, I truly have little idea about which are those specific costs, > > out of professional curiosity, got any pointers?] > > http://www.digitalvampire.org/blog/articles/2006/07/31/why-you-shouldnt-use-__attribute__-packed
In fact the executive summary on that page applies nicely: "don’t add __attribute__((packed)) to your code unless you know you need it." My point [b] explained why/how "we know we need it". You seem to have ignored that part of the discussion this time, just like the last several times it's come up. And for anyone who's tempted to shudder at the ASM there, from two platforms well-known for code bloat: - If you care that much about obect code size, don't use those platforms for that kind of code!! Crunch quad FP or somesuch. - Hey, did you notice how he's counting that final "b,a" as part of the SPARC functions? It's not; its a kind of padding between functions (branch to the next function). Some of his supporting "facts" are clearly wrong... - Remember that not only do USB descriptors hardly ever use 32 bit values -- so that "bloated" code is 2x fatter than it would usually be -- but also that when the compiler isn't allowed to generate such code selectively, the source code will *always* need to do it. Ugly, and often not needed. > __attribute((__packed__)) is hardly superior to the old style which > worked fine for a 1000 years before gcc. Yes, that "old style" you're promoting is indeed from the Dark Ages. And you *can* make anything sound bad if you disregard its strengths, as you've been doing with respect to "packed". - Dave ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel