iTranslated by AI

The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
😈

Which Lasts Longer: UUID Collision Time or the Buddhist Avici Hell?

に公開1

This is a random thought I had after reading an article by someone who investigated the collision time of UUIDs. It's a bit of a musing.

https://zenn.dev/kiyocy24/articles/uuid-duplicate-time

Avici Hell

Also known as Abichi Hell, it is said to be the lowest level among the eight Buddhist hells, where the most wicked people fall. In Buddhism, based on the concept of reincarnation, even those who fall into hell are eventually reborn. However, falling into hell means the time spent before being reborn is extremely long. And the duration of the lowest level, Avici Hell, is mind-bogglingly long. I compared that duration with the collision time of UUIDs.

The Length of Avici Hell

The length of one day in Avici Hell is equivalent to 64,000 years, where one day in that scale is 6,400 years in the human world. Calculating this:

6400 * 365 * 64000 = 149504000000

That is 149.504 billion years. This is just one day. Since this continues for 64,000 years:

149504000000 * 365 * 640000 = 34924134400000000000

It becomes 34.9241344 quintillion years. During this time, one literally suffers the agonies of hell.

Another theory states the length of a day is 80,000 years, assuming 8,000 human years as one day. In that case, 80,000 years is the duration of the sentence in hell. Calculating with that theory, it becomes 6.82112 quintillion years, which is a staggering amount of time regardless of the theory.

So, Which is Longer?

According to the article, it takes about 15.5 quintillion years to cause a UUID collision, which is a longer duration than the sentence in hell. Even if a wicked person were reborn after enduring the torments of hell, a collision still wouldn't have occurred, so we can use UUIDs with peace of mind regarding collisions.

Reference

Eight Great Hells - Wikipedia

Discussion

KageShironKageShiron

該当記事のコメントにあるように、検証しているプログラムが間違っている(弱衝突耐性の衝突時間を測っている)ので実際には1550京年よりずっと短い時間で衝突するかとおもいます。