I think this is the simplest case for breqn which requires
linear time, but that in the worst case it can take exponential
time in the number of symbols processed. Your expression is
also quite small. Computer algebra systems can produce expressions
which are many pages long, and the display program must do
something useful with the result.
By bundling in the startup time for TeX with processing the
expression, you are obscuring the possibility that using
breqn may actually be 10X the non-breqn time. Try
timing tex on a null file . If you got
real time of 0m29.5s, then the time to process (100X) of
the first expression is 0.7 second, and the time to process
the second is 2.3 second. So the time for using breqn could
be substantially longer. A better example would be computing
the display for ratexpand((x+y+13)^1000);
It may also be the case that most installations of TeX would
choke on such large expressions anyway, running out of stack etc.
TeX solves some problems in a useful fashion. Technical writing
by humans. It does not necessarily follow that it will solve
this (different) problem, of displaying REALLY LONG expressions.
I have suggested in the past that it might be better to
display long expressions in a substantially different fashion.
For example.
Your answer is the sum of 452 terms t{0..451}. They are available
in the attached table....
Your answer is a product of ....
Your answer is f( arg1,arg2:sum(457 terms......),...)
etc.
I would nevertheless be interested on your benchmarks for
much larger expressions on breqn. When I tried it (not on
the fastest computer, some time ago) it seemed rather slow.
Maybe TeX would have been slow typesetting on one line, too!
RJF
Jesper Harder wrote:
>Richard Fateman <fateman@cs.berkeley.edu> writes:
>
>
>
>>Actually I doubt that breqn works well enough for anything but
>>trivial demonstrations. In addition, it is very slow.
>>
>>
>
>Really? Did you ever try to benchmark it?
>
>Below are the results of processing the TeX expression from
>
> sum(x[i],i,1,100);
>
>with breqn (1.tex) and without breqn (2.tex):
>
>,----
>| $ time for ((i=100;i--;)); do tex \&mylatex 1.tex > /dev/null; done
>|
>| real 0m30.191s
>| user 0m25.850s
>| sys 0m4.260s
>|
>| $ time for ((i=100;i--;)); do latex 2.tex > /dev/null; done
>|
>| real 0m31.834s
>| user 0m27.870s
>| sys 0m3.900s
>`----
>
>As we see using breqn isn't any slower than ordinary LaTeX for this
>example.
>
>_______________________________________________
>Maxima mailing list
>Maxima@www.math.utexas.edu
>http://www.math.utexas.edu/mailman/listinfo/maxima
>
>