Sorry! UCOUNTER is right. :P
I have a word just like PROFILE. You could even gather results in an array
and then get the average or the mean to compensate for variances because of
cache, multitasking, or whatever.
On Tue, Feb 2, 2010 at 11:58 AM, Ron Oliver <ron_at_forth.com> wrote:
> Ron Oliver wrote:
> >
> > e.g.: to test FOO:
> > 1000 FOO PROFILE \ print time required to run FOO 1000 times
>
> Oops! I meant
>
> 1000 PROFILE FOO \ print time required to run FOO 1000 times
>
> Normally, what I'd do is just write a simple throwaway word:
>
> : TIME-FOO ( -- ) uCOUNTER 1000 0 DO FOO LOOP uTIMER ;
>
> There! It doesn't get any simpler than that.
>
>
> -Ron
> ----------------------------------------------------------------------
> sftalk_at_forth.com The SwiftForth programming discussion email list
> To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
> For list command help, send subject "help" to sftalk-request_at_forth.com
> Message archives are located at http://www.forth.com/archive/sftalk
> ----------------------------------------------------------------------
> This list is a forum for SwiftForth users. For product support and
> bug reports, please send email to support_at_forth.com
> ----------------------------------------------------------------------
>
>
----------------------------------------------------------------------
sftalk_at_forth.com The SwiftForth programming discussion email list
To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
For list command help, send subject "help" to sftalk-request_at_forth.com
Message archives are located at http://www.forth.com/archive/sftalk
----------------------------------------------------------------------
This list is a forum for SwiftForth users. For product support and
bug reports, please send email to support_at_forth.com
----------------------------------------------------------------------
Received on Tue Feb 02 2010 - 09:22:59 PST
Subscribe to our e-mail list service. It's free for all SwiftForth and SwiftX users!
This archive was generated 09-Feb-2012. Archive updated nightly.