0
$\begingroup$

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?

$\endgroup$
3
  • $\begingroup$ Which letters? Remember that the alphabet that most computers use to communicate consists of $0$ and $1$, represented in different ways in the electromagnetic field. $\endgroup$ – plop Sep 11 '20 at 14:27
  • 1
    $\begingroup$ There is an Internet Engineering Task Force discussing such matters and publishing Requests For Comments. $\endgroup$ – greybeard Sep 11 '20 at 16:19
  • $\begingroup$ For future reference: With this kind of question it would help if you told us in the question what your thinking is (e.g., why you are thinking it would/might help, or what makes you ask). $\endgroup$ – D.W. Sep 11 '20 at 23:03
4
$\begingroup$

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.

$\endgroup$
3
  • $\begingroup$ Thanks for understanding my question. Your answer is very clear. I guess we could use base64, which I've just heard about $\endgroup$ – GilbertS Sep 16 '20 at 15:35
  • 1
    $\begingroup$ @GilbertS: Base 64 still has 33% overhead over just sending the number directly, since you are wasting 2 bits per octet. Say, you have a 48 bit (6 octets) number. In order to encode this into Base64, you break into 8 chunks of 6 bit, convert each chunk of 6 bit into a character, and then send those 8 characters in 8 octets. Now you have increased the data to transmit from 6 octets to 8 octets. $\endgroup$ – Jörg W Mittag Sep 16 '20 at 16:12
  • $\begingroup$ Where can I read and do research about these things $\endgroup$ – GilbertS Sep 19 '20 at 16:53
2
$\begingroup$

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.