Don't underestimate all Perl solutions. See some of the later benchmarks where the use of the ternary operator has been improved!
For an arbitary number of values the List::Util approach is very likely to be fastest, and surely the fastest to code. For the two element special case the ternary operator wins hands down.
In reply to Re^2: assigning the maximum of two numbers
by GrandFather
in thread assigning the maximum of two numbers
by bageler
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |