[Ecls-list] Inline floating point operations.
Waldek Hebisch
hebisch at math.uni.wroc.pl
Mon Jul 29 23:54:33 UTC 2013
Mark Cox wrote:
>
> On 30/07/2013, at 1:08 AM, Waldek Hebisch wrote:
>
> > The attached file contains code for Carlson symmetic elliptic RF
> > function. Using sbcl it generates quite efficient machine
> > code, in particular main loop operates on machine registers
> > and contains directly machine floating point operations.
> >=20
> > Compiling the same code using ecl I get C output which
> > performs almost all operations by calls to library
> > functions. Note: before compilation I issued
> >=20
> > (proclaim '(optimize (safety 0) (speed 3)))
>
> Are you sure you are compiling it correctly? If I put=20
>
> (declaim (optimize (speed 3) (debug 0) (safety 0) (space 0)))
>
> at the top of ell_car.lisp and compile it using
>
> (compile-file "/tmp/ell_car.lisp" :c-file "/tmp/ell_car.c")
>
> this is the output C function. Inlining seems to be happening.
>
Oops. I keep forgeting that ecl ignores optimize proclaims
made before loading compiler. If I repeat proclaim and
compilation the second compilation indeed produces
optimized output. Sorry for the noise, I am trying to
find out why some bigger code is not optimized and
now it looks that problem is on my side (bigger code is
doing proclamation after loading compiler, but I had
another bug in my code).
--
Waldek Hebisch
hebisch at math.uni.wroc.pl
More information about the ecl-devel
mailing list