[Openmcl-devel] how does one cause stack-allocation for floats?

Gary Byers gb at clozure.com
Fri Mar 31 20:59:41 PST 2006



On Fri, 31 Mar 2006, Gary King wrote:

> I'm probably missing something entirely (I'm tired, it's late, and,
> frankly, this stuff often leaves me a bit confused...) but how dos
> Randall Beer's FPC code fit into this discussion?
>
> thanks
>

I think that it may be a reasonable compromise between the ideal
(smarter OpenMCL compiler) and reality (the compiler's lack of FP
smarts sometimes means that it's not practial to write FP-intensive
code in OpenMCL, unless one's willing to jump through some non-portable
low-level hoops to do so.)

FPC also inlines/open-codes more stuff, and that's often at least as
much of a contributing factor to bad performance as unnecessary consing
is.  (The example that we were looking at earlier spends more time in
OpenMCL trying to figure out how to coerce an integer into a double-float
than it does in 3 or 4 GC invocations, which is kind of amazing ...)

Toomas's point - that he'd gladly rewrite all of the code he's written
that does some sort of hoop-jumping - was helpful to me: I think that
I sometimes assume that if a really bad interface is exposed (documented/
exported) that it'll stay around for the next decade and will be difficult
to ever get rid of.

Some or all of FPC might break if the compiler got smarter.  In the
meantime, it might help (and might help a lot), and it'd probably be
a good thing if and when it does break.

I'd be willing to commit to not breaking FPC casually (and/or
repairing any such casual breakage), and I suspect that Randall would
be glad if people stopped using FPC someday because they no longer
have to.



More information about the Openmcl-devel mailing list