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

Re: Confusion about code sample in perlfaq4

by BrowserUk (Pope)
on Feb 22, 2013 at 19:50 UTC ( #1020214=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $vec = pack 'V', int( 2**32* rand() );;
    
    ...
    
    print @ints;;
    1 2 8 9 10 11 12 13 15 16 19 24 26 27 29
    
  2. or download this
    C:\test>perl -MMath::Random::MT=rand -minteger -MBenchmark=cmpthese
    $vec = pack 'V*', map int( 2**32* rand() ), 1 ..10;;
    ...
    a  22306/s   -- -79%
    b 108646/s 387%   --
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1020214]
help
Chatterbox?
[Corion]: erix: I'm not sure if it really is MySQL - maybe MS SQL also has LIMIT 0
[erix]: it has TOP, IIRC
[Corion]: erix: Ah. I use where 1 = 0 for queries where I only am interested in the structure ;)
[erix]: 1=0 is as short as TOP :)
[erix]: "code of someone that died" -- kinda nice if your code stops working too
[erix]: hard to implement, hmm

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (10)
As of 2017-01-23 09:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (192 votes). Check out past polls.