# from Sisyphus
# on Thursday 18 January 2007 09:51 pm:
>In terms of performance, I don't think it matters much which way you
> go about it.
If the caller is routinely passing extremely large arrays, passing as an
array ref should be quite a bit faster than a list of values (each of
which gets copied.) Particularly, if the function is non-destructively
querying the list, it won't need an internal copy. Of course, this is
just overhead, so if you're calling it only once and waiting for it to
run, it is probably negligible. However, IIRC, the XS code comes out a
little cleaner to loop through an array ref than an arbitrarily long
list.
--Eric
--
Hot dogs: just another condiment.
--Heart-attack Man
---------------------------------------------------
http://scratchcomputing.com
---------------------------------------------------