[Openmcl-devel] Floating point performance
    Paul Onions 
    wibble37 at mac.com
       
    Sat Jan 30 08:28:57 PST 2010
    
    
  
Hello,
I'm trying to understand how to optimize some floating point code  
under CCL, but I get wildly different timings from what I expect. For  
example:
Case 1: a reasonable outcome
(defun test-fun-1 ()
   (loop repeat 1000000
         for x = 1.0 then (+ x 0.01)
         sum (expt x 2)))
takes about 0.6 second on CMUCL and about 1.2 second on CCL, which is  
okay, but
Case 2: an _unreasonable_ outcome
(defun test-fun-2 ()
   (loop repeat 1000000
         for x = 1.0 then (+ x 0.01)
         sum (sqrt x)))
takes about 0.8 second on CMUCL but about 200 seconds(!) on CCL.
Can anybody enlighten me as to what is going on here?
BTW I'm running 1.5-dev-r13391M-trunk (DarwinPPC32)
Thanks,
Paul
    
    
More information about the Openmcl-devel
mailing list