Subject: Efficiency: predicate vs function
From: Justin Johansson <procode@xxxxxxxxxx>
Date: Mon, 23 Jul 2007 05:31:11 +0900
|
May I please seek the list's enlightenment.
If a standard function exists to do the same thing as can me done with
a predicate on a sequence, which is generally the more efficient
to choose; processor dependent or is it just a moot point?
For example, to return a sequence of all items but the last, which of the
following is better?
$x[ position() > 1 ]
or
remove( $x , 1 )
Thanks very much.
Justin Johansson
|