Your line profile isn't very helpful because all it tells you is that
the Point creation is slow, which is what you already knew. I would
try running your same code with
https://github.com/joerick/pyinstrument, or put the line profile
decorator on the geometry code.

Aaron Meurer

On Thu, Oct 30, 2014 at 5:38 AM, Amit Saha <[email protected]> wrote:
> Hi all,
>
> Just noticed that creating even 1000 point objects is quite slow:
>
> from sympy import Point
> @profile
> def create_points():
>     for i in range(1000):
>         Point(i, i)
>         i**2
>
> create_points()
>
> A random profiling run using https://github.com/rkern/line_profiler is here 
> at:
> https://gist.githubusercontent.com/amitsaha/bdde2b959658dda81536/raw/acf98e57aa5c3afbef497768fb777f5de2a5048f/gistfile1.txt
>
> On an average this code takes 0.3 s. is there any way that this can be 
> improved?
>
> Thanks,
> Amit.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/sympy.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sympy/CANODV3ksscGCmrsLE8c2dOf70Qu3X7WhuzCk1rZBZjdGD8aYJw%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAKgW%3D6%2B3-Cu6noW%2BbREZdC_g9-0h9Do4i9YnmVCp9%2B48Gfe2jQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to