From: Ryan Davis Date: 2007-03-12T10:04:06+09:00 Subject: Re: generate UUID On Mar 11, 2007, at 5:16 PM, Gary Wright wrote: > I couldn't tell from the message if Ryan or Aaron wrote the > parts I quoted above... I wrote all those parts. > I'm not an expert on UUIDs but I think there is a real > semantic difference between a UUID and a random number > of the same (binary) length. RFC 4122 has lots of good > information on UUIDs: http://www.ietf.org/rfc/rfc4122.txt No, you're right, but for the most part, it really doesn't matter for any of my company's uses. The most popular UUID format I've seen uses the mac address as part of the encoding. I don't know of any portable way for a ruby script to get that, and with all our UUIDs being generated from a single server for the foreseeable future... yeah. Not too useful. In the specific case of uuidtools, it actually goes through WAY more convolutions that ever necessary and (according to the linux manpage on /dev/urandom) actually REDUCES the randomness of the UUIDs that it generates. I just couldn't live with my test times anymore. 30% was being spent on generating UUIDs that weren't any better than my random blob. Remember, 21 uuids per second. *blech* I mostly wrote the rest of the code to illustrate additional methods to get more performance out of (pure) ruby.