[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gcl-devel] [Maxima] how about we get rid of "fast arrays"
From: |
Camm Maguire |
Subject: |
Re: [Gcl-devel] [Maxima] how about we get rid of "fast arrays" |
Date: |
Mon, 16 Jul 2012 13:07:54 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) |
Greetings!
Barton Willis <address@hidden> writes:
> Robert Dodier wrote:
>
>>Considering that "fast arrays" (native Lisp hash tables) are, for most
>>implementations, so far as I know, not much faster than Maxima hash
>>tables,
>
> For undeclared arrays, here is a test that shows use_fast_arrays
> should be renamed use_slow_arrays :( The test creates a 1000 x 1000
> element hashtable with integer keys. Using CCL, the test takes 23
> seconds with use_fast_arrays : false and 134 seconds with
> use_fast_arrays : true to create the table. Oops. Maybe Camm's
> update for GCL's hash function will make make GCL hashtables fast for
> this test.
>
For what its worth, I am getting significant perfomance gains from fast
arrays. The timings for your file:
Evaluation took 0.0000 seconds (0.0000 elapsed)
(%i18) Evaluation took 0.0000 seconds (0.0000 elapsed)
(%i19) Evaluation took 0.0000 seconds (0.0000 elapsed)
(%i20) Evaluation took 20.9800 seconds (21.1100 elapsed)
(%i21) Evaluation took 19.8100 seconds (19.8800 elapsed)
(%o21) 1000000
(%i22) Evaluation took 0.0000 seconds (0.0000 elapsed)
(%i23) Evaluation took 12.3200 seconds (12.3800 elapsed)
(%i24) Evaluation took 10.3800 seconds (10.3900 elapsed)
(%o24) 1000000
(%i25) Evaluation took 0.0000 seconds (0.0000 elapsed)
(%i26) Evaluation took 0.5300 seconds (0.5300 elapsed)
(%i27) Evaluation took 9.7000 seconds (9.7200 elapsed)
(%i28) Evaluation took 9.7600 seconds (9.8100 elapsed)
(%o28) 1000000
(%i29) Evaluation took 0.0000 seconds (0.0000 elapsed)
(%i30) Evaluation took 0.0100 seconds (0.0100 elapsed)
(%i31) Evaluation took 6.3200 seconds (6.3300 elapsed)
(%i32) Evaluation took 6.2200 seconds (6.2500 elapsed)
(%o32) 1000000
> The test:
>
> n : 1000$
> display2d : false$
> showtime : all$
> for i : 1 thru n do for j : 1 thru n do a[i,j] : 1$
> (s : 0, for i : 1 thru n do for j : 1 thru n do s : s + a[i,j],s);
> use_fast_arrays : true$
> for i : 1 thru n do for j : 1 thru n do b[i,j] : 1$
> (s : 0, for i : 1 thru n do for j : 1 thru n do s : s + b[i,j],s);
> use_fast_arrays : false$
> array(larry,n,n)$
> for i : 1 thru n do for j : 1 thru n do larry[i,j] : 1$
> (s : 0, for i : 1 thru n do for j : 1 thru n do s : s + larry[i,j],s);
> use_fast_arrays : true$
> array(billy,''n,''n)$
> for i : 1 thru n do for j : 1 thru n do billy[i,j] : 1$
> (s : 0, for i : 1 thru n do for j : 1 thru n do s : s + billy[i,j],s);
>
> --Barton
>
--
Camm Maguire address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens." -- Baha'u'llah
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Gcl-devel] [Maxima] how about we get rid of "fast arrays",
Camm Maguire <=