FAQ

On Jan 18, 2007, at 10:51 PM, Sisyphus wrote:
----- Original Message ----- From: "Gregg Allen"
<greggallen@gmail.com>
.
.
.
(In comparison, the median XS program is hundreds of times faster.)
You mentioned Statistics::Descriptive - which, I believe, is pure
perl.
What/where is this "median XS program" ? (Or is that just another
way of saying "Inline::C program" ?)
This is what I was using for medians:

use Algorithm::MedianSelect::XS qw(median);

thanks.
So what's the correct way to have a Perl program pass some
"@array" to an inline C program, do its voodoo, and return the
value at the percentile value I requested?
See the "Variable Argument Lists" example in 'perldoc Inline::C-
Cookbook'.

You don't *have* to pass the arguments that way. You can
alternatively pass (from perl) a reference to "@array", and receive
the argument (on the C side) as either an SV* or an AV* (though I
don't think there are examples of this in the Cookbook).

In terms of performance, I don't think it matters much which way
you go about it.

Cheers,
Rob


Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 3 of 9 | next ›
Discussion Overview
groupinline @
categoriesperl
postedJan 19, '07 at 1:57a
activeJan 19, '07 at 11:59a
posts9
users4
websitemetacpan.org...

People

Translate

site design / logo © 2021 Grokbase