Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

System Speed

by mt2k (Hermit)
on May 20, 2002 at 04:37 UTC ( [id://167765]=obfuscated: print w/replies, xml ) Need Help??

Okay, this isn't really an obfuscation, but it is better here than anywhere else I believe. What does it do? Pass it any number and it will see how many seconds it takes for your computer to count that high. Granted, your computer is actually faster: it would run faster without the print statements :)

#!/usr/bin/perl #Usage: "script.pl INT" [INT = any # (5000+ to see anything)] ${_}=time;print$.++."\r"while($.<$ARGV[0]);$_=abs(time-$_);print$_." s +econds.";

No, it doesn't break Deparse. I am still working on figuring out a destruction method for that...

Replies are listed 'Best First'.
Re: System Speed
by jynx (Priest) on May 20, 2002 at 17:00 UTC

    The load time of Perl is small enough that you can use the esoteric $^T here and not lose any accuracy (at least, not enough to matter; if you were using Time::HiRes it would :)
    #!/usr/bin/perl #Usage: "script.pl INT" [INT = any # (5000+ to see anything)] print++$_,"\r"while$_<$ARGV[0];print$/,abs($^T-time),"s$/"
    jynx

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: obfuscated [id://167765]
Approved by sparkyichi
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2024-03-29 00:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found