Hi Dan,

The hash bucket sentence was only a joke about us posting the same
question at the same time :).

I don't have any particular thoughts on whether there's a reason to
use the truly random UUIDs over v1 UUIDs, I just wanted to check
whether the methods were equivalent so I know if I should evaluate
whether v1 UUIDs are appropriate for my use cases. I guess one reason
you might use randomUUID is if you need your UUID to be unguessable to
attackers that might know your MAC address.

Thanks for your reply, it was illuminating.

Lucas


On 4 March 2015 at 11:32, danle...@gmail.com <danle...@gmail.com> wrote:
> Lucas, if there are any good reasons why one should pay 10 times the cost to
> generate a UUID randomly, I'd like to hear them.
>
> Thank you very much for your kind words and please see my prior reply to
> Colin.
>
> Best,
> Dan
>
>
> On Tuesday, March 3, 2015 at 3:24:42 PM UTC-5, Lucas Bradstreet wrote:
>>
>> I've been thinking about this for a bit and our posts just happen to be
>> within a minute of each other! A hash bucket is filling up somewhere, I just
>> know it!
>>
>> On 4 Mar 2015, at 04:13, Colin Yates <colin...@gmail.com> wrote:
>>
>> Ha - the irony of you and I posting a message about uniqueness at pretty
>> much the same time :).
>>
>> On 3 Mar 2015 20:11, "Lucas Bradstreet" <lucasbr...@gmail.com> wrote:
>>>
>>> Hi,
>>>
>>> Nice work!
>>>
>>> I wanted to clarify something: it seems to me that the v1 uuids clj-uuid
>>> generate are not exactly equivalent or comparable to the uuids generated by
>>> java.util/randomUUID? It appears that V1 uuids are time (and MAC) based and
>>> don't use a cryptographic random number generator, so the use cases are
>>> different and the speed difference seems like more of a trade off.
>>>
>>> If I'm completely off base then please just say so.
>>>
>>> Thanks for the good work. Even with the above limitations I can see
>>> myself using the faster version in the future.
>>>
>>> Lucas
>>>
>>> On 2 Mar 2015, at 14:52, Jacob Strength <mypc...@gmail.com> wrote:
>>>
>>> That is pretty amazing, I'll have to remember this library next time I
>>> need to use UUID's.
>>> Also I think you meant 450% faster.
>>>
>>> On Sunday, March 1, 2015 at 5:35:16 PM UTC-7, danl...@gmail.com wrote:
>>>>
>>>> Ok, for anyone following my adventures optimizing clj-uuid, I've gotten
>>>> another substantial win.
>>>> Check it out:    http://danlentz.github.io/clj-uuid
>>>>
>>>> #'uuid/v1:                    443 nanoseconds
>>>> #'java.util.UUID/randomUUID: 2012 nanoseconds
>>>>
>>>> Also, the test suite has much greater coverage with individual tests for
>>>> each v1, v,3, v4, v5 uuid version.
>>>> And, finally, there more interesting notes about some of the esoteric
>>>> details of the node-id representation
>>>> and the way it is calculated to disambiguate it from any legal 802 MAC
>>>> hardware address.  And more.... ;)
>>>>
>>>>
>>>> ======================================================================
>>>>
>>>> user> (criterium/bench (uuid/v1))
>>>>
>>>> Evaluation count: 139356300 in 60 samples of 2322605 calls.
>>>> Execution time mean: 443.707611 ns
>>>>
>>>>
>>>> user> (criterium/bench (java.util.UUID/randomUUID))
>>>>
>>>> Evaluation count : 30850980 in 60 samples of 514183 calls.
>>>> Execution time mean : 2.012861 µs
>>>>
>>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Clojure" group.
>>> To post to this group, send email to clo...@googlegroups.com
>>> Note that posts from new members are moderated - please be patient with
>>> your first post.
>>> To unsubscribe from this group, send email to
>>> clojure+u...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/clojure?hl=en
>>> ---
>>> You received this message because you are subscribed to the Google Groups
>>> "Clojure" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an
>>> email to clojure+u...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Clojure" group.
>>> To post to this group, send email to clo...@googlegroups.com
>>> Note that posts from new members are moderated - please be patient with
>>> your first post.
>>> To unsubscribe from this group, send email to
>>> clojure+u...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/clojure?hl=en
>>> ---
>>> You received this message because you are subscribed to the Google Groups
>>> "Clojure" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an
>>> email to clojure+u...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@googlegroups.com
>> Note that posts from new members are moderated - please be patient with
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+u...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to clojure+u...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to