Timing

Posted by jbsnyder on
URL: http://elua-development.15.s1.nabble.com/Timing-tp2422112p2422127.html

Hmm.. In this case the tmr.getclock(0) is 50,000,000.

The other thing that I certainly would assume is that tmr.read(0)  
takes a little time itself, so that always adds a bit.  I'm just  
trying to understand if what I'm getting is normal, and to also get a  
sense for cost/benefit of using different approaches.

I suppose one thing I could do is stack things up so that there are  
many more operations being done per timed period to make sure that the  
most significant source of time usage is from the timed operation and  
not the timers themselves :-)

-jsnyder


On Feb 18, 2009, at 2:19 PM, Bogdan Marinescu wrote:

> I'll be coming back to this topic later, but for now a quick note:  
> don't trust the output of platform_get_time_diff_us THAT much :) At  
> least verify what's the base clock of the timer, it will give you an  
> idea about how accurate this measurement is.
>
> Best,
> Bogdan
>
> On Wed, Feb 18, 2009 at 10:15 PM, James Snyder <jbsnyder at fanplastic.org
> > wrote:
> OK. At least I know my compiler isn't messed up :-)
>
> I'm curious now though whether similarly clocked ARM7 vs AVR vs  
> Cortex-M3 (ARM Thumb2) vs etc.. do for these types of tests.
>
> -jsnyder
>
> On Feb 18, 2009, at 10:24 AM, Dado Sutter wrote:
>
>> Hello,
>>
>> On Wed, Feb 18, 2009 at 10:59, James Snyder  
>> <jbsnyder at fanplastic.org> wrote:
>>
>> > On Wed, Feb 18, 2009 at 02:19, James Snyder <jbsnyder at fanplastic.org
>> > wrote:
>> >
>> So, one of the things I've been doing recently is tracking timing  
>> data for adcscope.lua when running it.  I've found certain things  
>> that increase or decrease the amount of time spent getting samples,  
>> but I hadn't actually checked what the bare minimum time would be  
>> for a dry loop like the following:
>> >
>> > term.clrscr()
>> >
>> > while 1 do
>> >  t1 = tmr.start(0)
>> >  t2 = tmr.read(0)
>> >  dtime = tmr.diff(0,t2,t1)
>> >  term.gotoxy(1,1)
>> >  term.putstr(string.format("Time (us): %06d",dtime))
>> > end
>> >
>> > For LM3S6965, I get 79 us.  Is this correct?
>>
>> 79us exactly in my EK-LM3S8962 too.
>> (And I've figured out that you have disabled XMODEM Xfer on your  
>> build :)
>>
>> Abra?osssssssssss
>> Dado
>>
>> _______________________________________________
>> Elua-dev mailing list
>> Elua-dev at lists.berlios.de
>> https://lists.berlios.de/mailman/listinfo/elua-dev
>
> --
> James Snyder
> Biomedical Engineering
> Northwestern University
> jbsnyder at fanplastic.org
> http://fanplastic.org/key.txt
> ph: (847) 644-2322
>
>
> _______________________________________________
> Elua-dev mailing list
> Elua-dev at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/elua-dev
>
>
> _______________________________________________
> Elua-dev mailing list
> Elua-dev at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/elua-dev

--
James Snyder
Biomedical Engineering
Northwestern University
jbsnyder at fanplastic.org
http://fanplastic.org/key.txt
ph: (847) 644-2322

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.berlios.de/pipermail/elua-dev/attachments/20090218/d851d760/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part
Url : https://lists.berlios.de/pipermail/elua-dev/attachments/20090218/d851d760/attachment-0001.pgp