Are v1 as "unique" as randomUUID()? On 3 Mar 2015 20:08, "danle...@gmail.com" <danle...@gmail.com> wrote:
> PS. We are now TEN TIMES faster, so it is a lot easier to compute that > percentage: > > #'uuid/v1: 201 nanoseconds > #'java.util.UUID/randomUUID: 2012 nanoseconds > > > Best, > Dan > > > On Tuesday, March 3, 2015 at 3:06:35 PM UTC-5, danl...@gmail.com wrote: >> >> I invoked "engineer's privilege" to quote the number very >> conservatively. In one of the later episodes, didn't Scotty confide that >> the Enterprise actually went up to warp 11, he just never told anyone? :) >> >> Actually, you are right -- I noticed it after I hit "send". As you can >> tell, the relative performance number has been a little bit of a moving >> target as things improved quickly and I grabbed the number from a little >> too far back in the REPL. >> >> Thanks Jacob. I really do hope this is a library that people will find >> modestly useful. >> >> >> >> On Tuesday, March 3, 2015 at 2:45:38 PM UTC-5, Jacob Strength 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 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.