Is a GUID unique 100% of the time?

前端 未结 22 2873
孤独总比滥情好
孤独总比滥情好 2020-11-22 01:31

Is a GUID unique 100% of the time?

Will it stay unique over multiple threads?

22条回答
  •  暖寄归人
    2020-11-22 02:12

    From http://www.guidgenerator.com/online-guid-generator.aspx

    What is a GUID?

    GUID (or UUID) is an acronym for 'Globally Unique Identifier' (or 'Universally Unique Identifier'). It is a 128-bit integer number used to identify resources. The term GUID is generally used by developers working with Microsoft technologies, while UUID is used everywhere else.

    How unique is a GUID?

    128-bits is big enough and the generation algorithm is unique enough that if 1,000,000,000 GUIDs per second were generated for 1 year the probability of a duplicate would be only 50%. Or if every human on Earth generated 600,000,000 GUIDs there would only be a 50% probability of a duplicate.

提交回复
热议问题