The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Inactive » comp.soft-sys.math.mathematica

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Timing puzzle
Replies: 3   Last Post: Apr 13, 2013 2:02 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 2
Registered: 4/12/13
Re: Timing puzzle
Posted: Apr 12, 2013 2:16 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Clarification: n was 1000 in the posted test; for some reason the top line was mangled in copy/paste.
For n=5000 the results are

5.37185 Second
5.27741 Second
5.41862 Second
3.18303 Second
0.024265 Second

Conclusion: time for the top 4 goes up ~linearly, which suggests that the list is being modified by just appending one item, instead of placing a pointer to it. For the last one it goes up sublinearly.

Reason for worry: in the actual plot package n is not known until the plot is finished. My plotter actually builds dynamically three Graphics3D sublists: faces, edges, points and labels. Optional commands such as changing point size, thickness, colors and font styles, may be inserted at any point in those sublists. So the faster method (preallocating addresses with Table) is ruled out.

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.