lkml.org 
[lkml]   [2015]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: Issues with capability bits and meta-data in kdbus
    From
    On Wed, Apr 22, 2015 at 1:02 PM, Havoc Pennington <hp@pobox.com> wrote:
    > * the byte order marker in every message is silly

    It's worse than that.

    Conditional byte order is worse than silly - it's terminally stupid.

    This is not a "per connection" thing or a "every message"; thing. It's
    more fundamental than that. Protocols that have dynamic byte orders
    are pure and utter crap.

    The only sane model is to specify one fixed byte order. Seriously.
    It's equally portable, it generates better code - even on
    architectures that then have to unconditionally do byte order swapping
    - and it's simpler to add static type checks for etc. It's literally
    less code and faster to do a "bswap" instruction than to do a
    conditional test of some variable (even if you can then avoid the
    bswap dynamically),

    In other words, think networking, which statically just decided to use
    big-endian. Sure, that was the wrong choice in the end, but even
    picking the wrong endianness - but picking it statically - is better
    than the horrible mistake of thinking that you should have some
    variable byte order.

    Linus


    \
     
     \ /
      Last update: 2015-04-23 00:01    [W:4.475 / U:0.144 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site