Exponentiation used in division? & Some extrordinary slowness is some problems.



modedeclare is useful when the Maxima+Lisp compilers can take advantage of
a more efficient representation or more efficient operations than those
used by the interpreter.

That is the case for some kinds of numbers (though not bfloats) and some
kinds of arrays.

There is no way to declare an argument as a string, or a symbol, or as a
list, etc., because the Maxima+Lisp compilers don't know how to take
advantage of that information.  You can still compile functions whose
arguments and internal variables are not modedeclare'd -- it's just that
the speed-up will be smaller.

Again, we should be able to help you improve the performance of your code
if you can give us a *short, self-contained, reproducible *example.

               -s


On Tue, Dec 31, 2013 at 5:51 PM, Dennis Darland - student <
student at dennisdarland.com> wrote:

> I have functions to which I pass strings. I see no type for them. Does
> that mean I can not use modedeclare?
> I saw that you can pass only some functions (instead of all) to compile,
> does that mean I could compile all except those
> containing strings and still run the program?  If not there is no use in
> trying it.
>
> There are over 100 programs in my test suite. Only two take anything like
> this long. They are quite long complex  programs but so are many of the
> others.
>
> I am not very concerned about this as I can use the other languages, and I
> have learned a lot in the process.
>
> Dennis Darland
> student at dennisdarland.com
>
>
> On 12/31/2013 12:04 PM, Dennis Darland - student wrote:
>
>> I've decided to try modedeclare. If I remember correctly, I could not use
>> bfloat in declare_variable either. I will
>> try to isolate the changes however. I only have one program to generate
>> c, c++, Ruby, Maxima or Maple.
>>
>> Dennis Darland
>> student at dennisdarland.com
>>
>> On 12/31/2013 11:08 AM, Robert Dodier wrote:
>>
>>> On 2013-12-31, Dennis Darland - student <student at dennisdarland.com>
>>> wrote:
>>>
>>>  I do not expect maxima to be comparable to c at number crunching,
>>>> but there are two examples in my tests that it appears would take over
>>>> one day to complete using maxima, but take only 4 and 5 seconds
>>>> respectively in c.
>>>>
>>> A major factor is that Maxima is probably doing something much more
>>> general than necessary. Speeding up the code would require recognizing
>>> that a special case is possible and then exploiting it. Maxima has some
>>> machinery for that, but it is clumsy to use and not terribly effective.
>>> I certainly agree that getting Maxima to run faster is a good idea, but
>>> at present we (developers) are mostly concerned with trying to get it
>>> to run correctly first. If you would like to work on speed, though, you
>>> are more than welcome to do so.
>>>
>>> best
>>>
>>> Robert Dodier
>>>
>>> _______________________________________________
>>> Maxima mailing list
>>> Maxima at math.utexas.edu
>>> http://www.math.utexas.edu/mailman/listinfo/maxima
>>>
>>