Actually, I'm handling the parametes as a list, and calling separate functions for each parameter. Function is not a function in my code, it is a marker to which functions to use with the parameters.
function_one($param[0]);
function_one($param[1]);
and_so_on;
As a side note, parameters and "function names" are not always alphanumeric.
The Benchmark results from Chipmunk's code
Benchmark: timing 10000 iterations of beatnik1, chipmunk1, chipmunk2
beatnik1: 536 wallclock secs (449.49 usr + 2.70 sys = 452.19 CPU)
chipmunk1: 390 wallclock secs (360.76 usr + 2.25 sys = 363.01 CPU)
chipmunk2: 313 wallclock secs (250.84 usr + 2.00 sys = 252.84 CPU)
Again, muchos kudos to Chipmunk
Greetz
Beatnik
... Quidquid perl dictum sit, altum viditur.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.