[Ecls-list] Speed of indirect calls.

Juan Jose Garcia-Ripoll juanjose.garciaripoll at googlemail.com
Mon Feb 16 15:07:29 UTC 2009


2009/2/16 Juan Jose Garcia-Ripoll <juanjose.garciaripoll at googlemail.com>:
> I have produced another test code (see below), which shows that the
> differences are not so large, even with the old code for "funcalling".

Hmm, even though the differences are small, they build up to a large
difference in functions that use indirect function calls a lot. This
is the case, for instance, of sequence functions. After adding
declarations and using the new_cfun branch we get for the code below

real time : 0.581 secs
real time : 0.395 secs
real time : 0.520 secs
real time : 0.534 secs

to be compared with the master branch

real time : 1.193 secs
real time : 0.622 secs
real time : 0.883 secs
real time : 0.878 secs

Juanjo

(time (dotimes (i 100000) (count-if #'identity #.(make-array 128
:initial-element nil))))

(time (dotimes (i 100000) (count nil #.(make-array 128 :initial-element nil))))

(time (dotimes (i 100000) (count nil #.(make-array 128 :initial-element nil)
				 :test #'eql)))

(time (dotimes (i 100000) (count nil #.(make-array 128 :initial-element nil)
				 :test-not #'eql)))


-- 
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28009 (Spain)
http://juanjose.garciaripoll.googlepages.com




More information about the ecl-devel mailing list