Author Topic: Is the Byte obsolete?  (Read 4240 times)

0 Members and 1 Guest are viewing this topic.

Offline Rick Law

  • Super Contributor
  • ***
  • Posts: 3441
  • Country: us
Re: Is the Byte obsolete?
« Reply #25 on: July 21, 2021, 12:42:37 am »
Hmmm...

I guess 4 passenger cars are obsolete as well.  Forget the Honda Civic and Toyota Camry, we have 5 axle 18 wheel tractor-trailer trucks that can carry over 150,000 pounds at one go, or pack 100+ standing "passengers".  Why still keep these limiting tiny thing that can carry merely 4 people...
 

Online brucehoult

  • Super Contributor
  • ***
  • Posts: 4032
  • Country: nz
Re: Is the Byte obsolete?
« Reply #26 on: July 21, 2021, 01:16:34 am »
There are still MCUs commonly used which are very memory limited, and necessarily so due to cost constraints. I regularly design stuff to be mass produced where saving just a few cents per unit of the production cost can be quite significant. In these cases, memory optimization is often mandatory, and 8-bit bytes must be used, or sometimes even separate bits in the byte defined for different usage. If I'm writing a PC App with gigabytes of available memory, I don't care if a simple variable is using 8, 16, or 32 bits.

It's not so different as you might think.

While your PC might have 8 or 16 or 128 GB of RAM, that RAM is hundreds of clock cycles away from the CPU. Most PC / server CPUs only have 32K or so of L1 data cache, not so very different to the SRAM size on many microcontrollers. Your program won't crash if you exceed the cache size, but there are significant performance benefits to working mostly within it.
 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 8172
  • Country: fi
Re: Is the Byte obsolete?
« Reply #27 on: July 22, 2021, 11:07:42 am »
Exactly, and a cache line is as small as 32 or 64 bytes.

It's kind of funny when you consider a state-of-the-art number crunching gaming PC running with 32GB of RAM that saving a few bits somewhere may be crucial to make that 3D virtual reality run at a decent frames-per-second.

Arguably, variable granularity is best granularity. And that's exactly what computers do, in most instances the smallest accessible unit is byte or even a bit yet you can access the same data with wider instructions, going all the way to large parallel SIMD processing.
« Last Edit: July 22, 2021, 11:10:54 am by Siwastaja »
 

Offline rsjsouza

  • Super Contributor
  • ***
  • Posts: 5986
  • Country: us
  • Eternally curious
    • Vbe - vídeo blog eletrônico
Re: Is the Byte obsolete?
« Reply #28 on: July 22, 2021, 11:27:22 am »
There are still MCUs commonly used which are very memory limited, and necessarily so due to cost constraints. I regularly design stuff to be mass produced where saving just a few cents per unit of the production cost can be quite significant. In these cases, memory optimization is often mandatory, and 8-bit bytes must be used, or sometimes even separate bits in the byte defined for different usage.
Indeed. In my line of work bytes, UART/RS232, direct bit manipulation are all day-to-day lingo with no end in sight.

In the earlier days of Intel's MMX (SIMD), I still remember doing some programming using Intel's library for byte manipulation. Since then I left this field of large computer programming and I wonder if most of these optimizations vanish when hidden by layers and layers of SW. My impression (which could be wrong) is that cache size optimizations and considerations get completely washed away at an OS'es task context switch (as the cache is flushed for the next completely unrelated task) and the only serious work is done at the subsystem level (Video Graphics processors, for example).
Vbe - vídeo blog eletrônico http://videos.vbeletronico.com

Oh, the "whys" of the datasheets... The information is there not to be an axiomatic truth, but instead each speck of data must be slowly inhaled while carefully performing a deep search inside oneself to find the true metaphysical sense...
 

Online brucehoult

  • Super Contributor
  • ***
  • Posts: 4032
  • Country: nz
Re: Is the Byte obsolete?
« Reply #29 on: July 22, 2021, 12:31:06 pm »
My impression (which could be wrong) is that cache size optimizations and considerations get completely washed away at an OS'es task context switch (as the cache is flushed for the next completely unrelated task)

That depends on the cache design. If the cache uses physical address tags -- as is normal for L1 cache -- then it doesn't need to be flushed.
 

Offline dmills

  • Super Contributor
  • ***
  • Posts: 2093
  • Country: gb
Re: Is the Byte obsolete?
« Reply #30 on: July 24, 2021, 11:37:21 am »
Not being able to address bytes - at least remotely efficiently since you coud always do this using bitwise operations - would be a real pain in many applications.

Analog devices shark DSPs had me reworking a SPI protocol to better accommodate the fact that on that platform sizeof (char) == sizeof (short) == sizeof (int) == 1, rather annoying that was.

Regards, Dan.
 

Offline dmills

  • Super Contributor
  • ***
  • Posts: 2093
  • Country: gb
Re: Is the Byte obsolete?
« Reply #31 on: July 24, 2021, 11:51:59 am »
You may be right that majority of new video transitions into 10 bits in the near future.
Outside of computers the vast majority of video has been 10 bits (Generally 4:2:2 chroma subsampled Y'CbCr) for many, many years.
Even the old parallel BT.656 digital video (that nobody has used since the early days of standard def. digital video) was generally 10 bit per pixel.

Note that is 10 bits after the non linear light curve that is gamma has been applied, to work properly in linear light you actually need significantly more then 10 bits.

We are now starting to see displays with enough dynamic range that 10 bits is not sufficient even with a standard gamma applied, and there are various hacks to the gamma curves to allow greater dynamic range for HDR display (Which IMHO makes a FAR bigger difference then the move from 1080 to 4k).

8 bits per pixel is fine for a word processor, it leaves something to be desired for video, and a lot to be desired for photography.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf