Question

If we (scientists) came up with a way of representing numerical timestamps as letters hence reducing the number of bytes needed to represent timestamps, would that mean an improvement in internet speed as less data needs to be serialized?

Was it helpful?

Solution

If we restrict ourselves to the 52 letters from the Latin alphabet that are commonly used in English (i.e. we exclude letters like ï as seen in words like naïve), then we need 6 bits to encode each letter.

However, in 6 bits, we can encode 64 different numbers.

That means our encoding using letters is only 81.25% as dense as the encoding using numbers.

This is actually the best case scenario. Most protocols are octet-oriented, so we have to pad our representation to a full octet boundary. That means that a single letter will be encoded in 8 bits. A single letter can express 52 timestamps, but 8 bits can express 256 numbers.

We could try to find an alphabet with 64 letters (or even better 256 letters), then the representation using letters would be as good as the representation using numbers … but why go through all the trouble of representing timestamps (which, after all, are numbers) as letters, then at the other side of the transmission turn them back into numbers again when simply representing them as numbers is in the worst case just as efficient as when using letters and in the best and average case is significantly more efficient?

After all, computers and networks can only process and transport numbers, so whatever representation using letters you find, you will have to represent that representation using numbers again, and this representation cannot be more efficient than the original one.

Basically, you start off with a timestamp, which is a number, you need to end with a timestamp at the other end, which is a number, and the network can only transport numbers.

Your proposal looks like this:

  1. Encode the number as letters
  2. Encode the letters as a number
  3. Transmit the number
  4. Decode the number as letters
  5. Decode the letter as a number

Whereas what we are doing today is:

  1. Transmit the number

Which is more efficient.

OTHER TIPS

No, because we already know how to represent timestamps (or any other data) in a variety of ways: in binary, in hex, in base64. Probably only a miniscule fraction of all Internet data is timestamps, so reducing the number of bytes used to transmit timestamps will make only a miniscule difference on overall Internet speed.

Licensed under: CC-BY-SA with attribution
Not affiliated with cs.stackexchange
scroll top