Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re^5: Generate a unique ID

by Your Mother (Chancellor)
on Nov 17, 2010 at 15:32 UTC ( #872005=note: print w/replies, xml ) Need Help??

in reply to Re^4: Generate a unique ID
in thread Generate a unique ID

I'm curious about the why/which in this. I just ran you test code several times and even put it to 1e9 and 1e8 which both ran out of memory before completing and I got no "Repeat" deaths. This is on a modern Linux box with Perl 5.8. What hardware/perl combination makes yours bomb out so early?

Replies are listed 'Best First'.
Re^6: Generate a unique ID
by BrowserUk (Pope) on Nov 17, 2010 at 15:37 UTC

    I did mention the reason. MS' CRT rand() function uses 15-bits only.

    This also affects Perl directly because the perl's rand is implemented in terms of the crt function.

    I'd normally use Math::Random::MT for anything where I need a descent random, but the standard implementation (and therefore the Perl module) is not threadsafe due to some static internal buffers.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://872005]
[LanX]: for instance I tend to say (h)uman with a mute h, (no idea were I learned this think it's somehow BE), but when I met YM last year she was correcting me ... only to find out that new yorkes like Trump always pronouce it that way
[LanX]: both acceptable
[LanX]: Friend of my worked for an international cooperation in Singapore and said the guys with the biggest communication problems were the native speakers ... pointing out an australian guy who needed a year to notice that nobody understood him
[Eily]: ah yes, I've starting feeling more confident about my accent when I realised I'm always going to be pronuncing it wrong for someone anyway :)
[Eily]: started*
[ambrus]: LanX: native speakers are close, but they aren't on the top. there are a _few_ foreigners who have such a thick accent that it takes more time to get used to it and understand the words behind than even the worst native speaker accents.
[ambrus]: but yes, typically native English speakers, who think that English is still their exclusive property, are the worst.
[LanX]: Eily: do you live in an English speaking country?

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (8)
As of 2017-03-27 16:15 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (320 votes). Check out past polls.