Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^5: Near equal partitions.

by JavaFan (Canon)
on Jan 14, 2011 at 09:40 UTC ( [id://882312]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Near equal partitions.
in thread Near equal partitions.

There's benchmarking code elsewhere in the thread. It should be easy to add a 'use integer' case.

Replies are listed 'Best First'.
Re^6: Near equal partitions.
by happy.barney (Friar) on Jan 14, 2011 at 11:42 UTC
    with that code
    sub ikei { my ($n, $m) = @_; use integer; my $q = $n / $m; my $r = $n % $m; return ($q+1) x $r, ($q) x ($m-$r); }
    Rate ike ikei ike 50.8/s -- -4% ikei 52.8/s 4% -- Rate ike ikei ike 50.5/s -- -5% ikei 52.9/s 5% --

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (5)
As of 2026-05-13 13:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.