[MWForum]MIA, Ask an Expert: gravity, asciis, ...
Jeff Knope
mwforum@lists.mathcats.com
Sun, 10 Oct 2004 10:16:33 -0700
Hi ~
I've tried Mike's speed test and have uncovered some interesting things.
My timing method is evidently more crude than Mike's: I wait 'til the second
hand on the wall clock strikes 12 and hit 'return' to start the command.
When the large black dot indicating the command is running goes off, I look
quickly at the clock. I usually have to decide between, say 37 seconds or 38
or maybe it was 39. Mike pinned it down to a tenth of a second, so he must
be using a more sophisticated timing method.
If others report findings, along with their processor speeds, we might be
able to get a clearer idea of the effect of processor speed.
To make a level playing field, it'd be a good idea to do things in a
standardized way. I first issued a "home st recycle" before initiating the
"repeat 100[repeat 1000[fd 0.0001]] command. Whether the turtle is shown or
hidden makes a real difference: about 12 seconds slower with "st"
My processor is a P4 M, rated at 1.7 GHz, according to System Properties.
(For some reason, it says "1.19 GHz" directly below the CPU speed statement.
I have no idea what that means.)
My results using "st" are right at 55 seconds. About 38 sec. with "ht"
It was my understanding that processors handle intergers much more
efficiently than floating point values. To test this I tried the command
"repeat 100[repeat 1000[fd 1]]. Using the integer was about 5 seconds
faster.
By far the most perplexing outcome was when I tried this test using EX
instead of MWPro. In EX performance plummeted to 1:45 using "st" and 1:28
with "ht." That's about twice as long. My EX is version 1.0.0.1. My MWPro
doesn't show a version number, but all its .dll files are Version 11.0.0.0.
I'd be very interested to track down what accounts for this. I've grown very
fond of EX (especially the dialog boxes and single-line text boxes, that
improve program communication with the user enormously). But that
performance difference is a steep price to pay. Maybe Shawn could comment on
this?
--Jeff
----- Original Message -----
From: "Mike Sandy" <mjsandy@btopenworld.com>
To: <mwforum@lists.mathcats.com>
Sent: Sunday, October 10, 2004 7:33 AM
Subject: Re: [MWForum]MIA, Ask an Expert: gravity, asciis, ...
> > I've been thinking about this. I believe that
> > since the speed of computers increase exponentially
> > fd.slow should use exponents too:
>
> Does the speed of a turtle, in fact,
> increase exponentially with the computer
> rating? I've no way of knowing.
> It doesn't really matter, since it easy
> to allow for the computer rating.
>
> I've found that a turtle will move
> 1 unit given the instruction:
> repeat 100[repeat 1000[fd 0.00001]]
> It takes 38.4 sec. at 1.1 GHz.
> I would guess even at 3 GHz it is still
> going to be very slow!
>
> I had to use nested repeats as the
> maximum value of :n for repeat :n[...],
> is 9999.
>
> So there is plenty of scope to control the turtle
> speed.
> One way to cover (most) computers would
> be to introduce a factor, comp_f. (as a projectvar?),
> or simply to use a value in the proc as decided by
> experiment.
>
> to fd_slow :dist
> repeat :dist / speed * comp_f [fd speed / comp_f]
> end
>
> speed - the speed of the turtle.
>
> On my machine, with slider range 1 - 20, comp_f = 50
> might do.
>
> Mike
>
>
> > Hi Mike,
> >
> > I've been thinking about this. I believe that
> > since the speed of computers increase exponentially
> > fd.slow should use exponents too:
> >
> >
> > to fd.slow :dist
> > let [val power 2 20 - speed]
> > repeat :val [fd :dist / :val]
> > end
> >
> > This works with a slider 0-20.
>
>
>
> _______________________________________________
> MWForum mailing list
> MWForum@lists.mathcats.com
> http://lists.mathcats.com/mailman/listinfo/mwforum
> Attachments archived at:
> http://www.mathcats.com/mwforum/attachments.html
> To unsubscribe or for administrative questions contact
> mailto:mwforum-admin@lists.mathcats.com
>