Skip Navigation
Jump
Is the bitwise AND of subnet masks and IP addresses redundant?
  • Probably because it’s only four bytes of data, and counting/extracting bits takes more cpu time than one AND operation.
    Most CPU’s are optimised to work with whole integers (32/64 bit) rather than individual bits.

    If memory was a serious concern you could compress it down to one byte as a ‘number of 1s’ counter at the cost of additional cpu operations, but because 3 extra bytes is such a small amount of data, this memory/time trade off isn’t worth it in most systems.

    It’d be useful if you wanted to compress some data logs or something with many subnet masks though.

    10
  • Jump
    Recommendation engine: Downvote any game you've heard of before
  • That guy’s seriously talented!
    Among the things he’s made, he’s also made some really nice, easy to understand, high-speed compression formats (QOI/QOA), as well as a public domain mpeg decoder.

    I’ve used all three for various projects and I’d highly recommend that most software developers check them out. If only for the learning experience.

    2
  • Jump
    What's the most petty/pointless/pedantic hill you're willing to die on?
  • Oh, I get you.
    Sorry, I’m not American, so I’ve never heard people call them that.
    Where I live, ‘truck’ is exclusively used for the vehicles used with logistics or heavy machinery.

    Totally understand what you mean now, and yeah fuck those guys lol.

    4