Article View: sci.math.symbolic
Article #1048Compiled Functions in Mma
From: Jack Stecher
Date: Sun, 10 Jan 1993 17:41
Date: Sun, 10 Jan 1993 17:41
29 lines
1767 bytes
1767 bytes
I've been trying to use compiled functions in Mma 2.1, and have run into
some difficulties.
First, the difficulty I suspect there isn't a way around: Does anyone know
if there's a way to use Compile when the arguments are matrices? Didn't
think so....
Now, for one that just confuses me: I'm using Mma on a Dec/Ultrix type
station, and don't know where to find the stats routines. It's easy enough
to write the formula for a normal density, and the normal cdf can be written
using Erf. I used Newton's method to solve iteratively for a normal quantile
corresponding to a given probability.
When I used uncompiled code for my everything, solving the normal quantile
for .0001 took something like 8 seconds; with compiled code, it took something
like half a second. But then I loaded a data set to do statistical calcula-
tions on. The calculations used my compiled code within the routines (I
was computing log-likelihood functions), and were incredibly slow. Well, after
I finished, I timed the normal quantile for .0001, and it took something like
20 seconds, using compiled code.
Anyone have any clues about where I should look for the problem?
Jack Stecher
stecher@atlas.socsci.umn.edu
--
A government big enough to give you all you want
is big enough to take it all away.
--Barry Goldwater
Technical Details
Message-ID:
<C0nFt4.F0B@news2.cis.umn.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!gumby!wupost!spool.mu.edu!umn.edu!stecherShow Full Headers
Complete Article Headers
Newsgroups: sci.math.symbolic Path: arc1-ca.pugleaf.net!sparky!uunet!gumby!wupost!spool.mu.edu!umn.edu!stecher From: stecher@atlas.socsci.umn.edu (Jack Stecher) Subject: Compiled Functions in Mma Message-ID: <C0nFt4.F0B@news2.cis.umn.edu> Sender: stecher@atlas.socsci.umn.edu Nntp-Posting-Host: daphne.socsci.umn.edu Organization: Department of Economics, Univ of Minn Date: Sun, 10 Jan 1993 17:41:27 GMT Lines: 29