[Openmcl-devel] Another 32/64-bit Example -- RayTrace

Brent Fulgham bfulg at pacbell.net
Tue Oct 31 22:48:47 PST 2006


On Oct 30, 2006, at 8:35 PM, Gary Byers wrote:

> The bug that you found (ppc32 signaling a floating-point overflow in
> 1.1) was because AREF of a (SIMPLE-ARRAY DOUBLE-FLOAT (*)) (e.g., of a
> simple double-float vector) was returning garbage.  (If you try to
> sqare that particular piece of garbage, you will indeed overflow.)

This works with my new build; thanks very much.

> The fact that it was going out of line to access the components of VEC
> structures (which are implemented as simple double-float vectors)
> suggested a fairly simple change; inlining the structure accessors
> made the fact that double-floats were involved apparent and allowed it
> to inline more FP arithmetic and sped things up by about 2.25x (and
> consed about 30 gigabytes less ...)
>
> That's certainly a step in the right direction and there may be a few
> other pieces of low-hanging fruit worth picking off, but sooner or
> later there's no more low-hanging fruit left ...

With this recently-removed fruit, we now have:

Case 1:  PPC32 (OpenMCL 1.0)
=========================
(MAIN 8 "output.ppm" 400) took 295,796 milliseconds (295.796 seconds)  
to run.
Of that, 186,475 milliseconds (186.475 seconds) were spent in user mode
          63,023 milliseconds (63.023 seconds) were spent in system mode
          46,298 milliseconds (46.298 seconds) were spent executing  
other OS processes.
31,355 milliseconds (31.355 seconds) was spent in GC.
47,547,202,264 bytes of memory allocated.

Case 2:  PPC32 (OpenMCL 1.1)
=========================
(MAIN 8 "output.ppm" 400) took 126,480 milliseconds (126.480 seconds)  
to run.
Of that, 90,132 milliseconds (90.132 seconds) were spent in user mode
          16,729 milliseconds (16.729 seconds) were spent in system mode
          19,619 milliseconds (19.619 seconds) were spent executing  
other OS processes.
9,378 milliseconds (9.378 seconds) was spent in GC.
15,744,946,560 bytes of memory allocated.

Case 3: PPC64 (OpenMCL 1.1)
=========================
(MAIN 8 "output.ppm" 400) took 114,704 milliseconds (114.704 seconds)  
to run.
Of that, 92,745 milliseconds (92.745 seconds) were spent in user mode
          10,295 milliseconds (10.295 seconds) were spent in system mode
          11,664 milliseconds (11.664 seconds) were spent executing  
other OS processes.
5,019 milliseconds (5.019 seconds) was spent in GC.
15,783,944,112 bytes of memory allocated.

Case 4: SBCL (32-bit)
=========================
* (time (main 8 "outputsbcl.ppm" 400))

Evaluation took:
   27.511 seconds of real time
   11.886907 seconds of user run time
   7.56218 seconds of system run time
   [Run times include 0.797 seconds GC run time.]
   0 calls to %EVAL
   0 page faults and
   2,882,202,560 bytes consed.
NIL
*

So, considerable gains!  Although we still cons 15.7 MB compared to  
SBCL's 2.8 MB, the run time has dropped by more than half.

Thanks,

-Brent



More information about the Openmcl-devel mailing list