16459: add note in documentation
Add SAGE_PROFILE environment variable
Trac #16459: document use of lambda for non-symbolic functions

Previous title "polar_plot crash with expressions containing non-
symbolic functions".

Reported on sage-support:
{{{
sage: polar_plot((1+cos(fibonacci(floor(alpha)))), (alpha,
-3*pi/2,pi/2))
------------------------------------------------------------------------
---
TypeError                                 Traceback (most recent call
last)
<ipython-input-5-d55fb7d2b898> in <module>()
----> 1 polar_plot((Integer(1)+cos(fibonacci(floor(alpha)))), (alpha,
-Integer(3)*pi/Integer(2),pi/Integer(2)))

/home/ralf/sage/local/lib/python2.7/site-
packages/sage/combinat/combinat.pyc in fibonacci(n, algorithm)
    500         TypeError: no conversion of this rational to integer
    501     """
--> 502     n = ZZ(n)
    503     if algorithm == 'pari':
    504         return ZZ(pari(n).fibonacci())

/home/ralf/sage/local/lib/python2.7/site-
packages/sage/structure/parent.so in
sage.structure.parent.Parent.__call__ (sage/structure/parent.c:8905)()

/home/ralf/sage/local/lib/python2.7/site-
packages/sage/structure/coerce_maps.so in
sage.structure.coerce_maps.NamedConvertMap._call_
(sage/structure/coerce_maps.c:5442)()

/home/ralf/sage/local/lib/python2.7/site-
packages/sage/symbolic/expression.so in
sage.symbolic.expression.Expression._integer_
(sage/symbolic/expression.cpp:6142)()

TypeError: unable to convert x (=floor(alpha)) to an integer
}}}

URL: http://trac.sagemath.org/16459
Reported by: rws
Ticket author(s): Ralf Stephan
Reviewer(s): Karl-Dieter Crisman
Trac #16814: Add SAGE_PROFILE to enable profiler

The new `SAGE_PROFILE` environment variable controls whether to build
with profiling support. It defaults to off since this potentially is a
big performance impact. Right now it only controls Cython profiling, but
third-party packages should support it in the future if they can.

With `SAGE_PROFILE=no`:
{{{
 sage: %prun 1 + 1
         2 function calls in 0.000 seconds

   Ordered by: internal time

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
        1    0.000    0.000    0.000    0.000 <string>:1(<module>)
        1    0.000    0.000    0.000    0.000 {method 'disable' of
'_lsprof.Profiler' objects}
}}}
With `SAGE_PROFILE=yes`:
{{{
 sage: %prun 1 + 1
         13 function calls in 0.000 seconds

   Ordered by: internal time

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
        1    0.000    0.000    0.000    0.000 <string>:1(<module>)
        1    0.000    0.000    0.000    0.000 element.pyx:1538(__add__)
        1    0.000    0.000    0.000    0.000 integer.pyx:1605(_add_)
        3    0.000    0.000    0.000    0.000
integer.pyx:6276(fast_tp_new)
        2    0.000    0.000    0.000    0.000 integer.pyx:512(__init__)
        3    0.000    0.000    0.000    0.000
integer.pyx:6362(fast_tp_dealloc)
        1    0.000    0.000    0.000    0.000
coerce.pxi:7(have_same_parent)
        1    0.000    0.000    0.000    0.000 {method 'disable' of
'_lsprof.Profiler' objects}
}}}

URL: http://trac.sagemath.org/16814
Reported by: vbraun
Ticket author(s): Volker Braun
Reviewer(s): Martin Raum