Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#2451 closed defect (fixed)

[with patch; positive review] plotting -- contour_plot and plot_vector_field are REALLY SLOW but it's easy to get a million times speedup

Reported by: was Owned by: was
Priority: major Milestone: sage-2.10.3
Component: graphics Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

GitHub link to the corresponding issue

Description

There are two problems:

  1. neither use _fast_float
  1. Even worse, they don't coerce their endpoints to floats. This is a killer.

To illustrate:

var('x,y')
sage: time contour_plot(x^2+y^2, (-pi,pi),(-pi,pi))
takes forever
sage: time contour_plot(x^2+y^2, (-float(pi),float(pi)),(-float(pi),float(pi)))
takes forever
sage: f = (x^2+y^2)._fast_float_('x','y')
sage: time contour_plot(f, (-float(pi),float(pi)),(-float(pi),float(pi)))
CPU times: user 0.00 s, sys: 0.00 s, total: 0.00 s

Attachments (1)

sage-2451.patch (8.3 KB) - added by was 15 years ago.
part 1. there may be a part 2…

Download all attachments as: .zip

Change History (8)

comment:1 Changed 15 years ago by was

Status: newassigned

Changed 15 years ago by was

Attachment: sage-2451.patch added

part 1. there may be a part 2...

comment:2 Changed 15 years ago by was

Summary: plotting -- contour_plot and plot_vector_field are REALLY SLOW but it's easy to get a million times speedup[with patch; needs review] plotting -- contour_plot and plot_vector_field are REALLY SLOW but it's easy to get a million times speedup

comment:3 Changed 15 years ago by gfurnish

Summary: [with patch; needs review] plotting -- contour_plot and plot_vector_field are REALLY SLOW but it's easy to get a million times speedup[with patch; Positive review pending patch ] plotting -- contour_plot and plot_vector_field are REALLY SLOW but it's easy to get a million times speedup

Positive review pending patch of redundant line 4239.

comment:4 Changed 15 years ago by mabshoff

Summary: [with patch; Positive review pending patch ] plotting -- contour_plot and plot_vector_field are REALLY SLOW but it's easy to get a million times speedup[with patch; positive review] plotting -- contour_plot and plot_vector_field are REALLY SLOW but it's easy to get a million times speedup

I did remove the offending line after merging the patch.

Cheers,

Michael

comment:5 Changed 15 years ago by mabshoff

Resolution: fixed
Status: assignedclosed

Merged in Sage 2.10.3.rc4

comment:6 Changed 15 years ago by edrex

works as advertised in my limited testing.

gfurnish indicates that line 4239 is redundant

comment:7 Changed 15 years ago by edrex

oops, missed previous comments

Note: See TracTickets for help on using tickets.